🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
4 messages
4 total messages Started by Paulo Buzinello Wed, 13 Sep 2006 08:33
PlaySound() problem
#3028
Author: Paulo Buzinello
Date: Wed, 13 Sep 2006 08:33
11 lines
1111 bytes
Hi, All

Can someone help me to understand why the code
below does not work correctly? The music is played
but SND_ASYNC has no effect. I need to wait the
function play the entire music.

PlaySound("dance.wav",0,SND_ASYNC)

Thanks in Advance
Re: PlaySound() problem
#3031
Author: Bob Gonder
Date: Wed, 13 Sep 2006 16:10
15 lines
1476 bytes
Paulo Buzinello wrote:

> The music is played
>but SND_ASYNC has no effect. I need to wait the
>function play the entire music.
>
>PlaySound("dance.wav",0,SND_ASYNC)

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/wcewave/html/_wcesdk_win32_playsound.asp

SND_ASYNC The sound is played asynchronously and PlaySound returns
immediately after beginning the sound.  

SND_SYNC Synchronous playback of a sound event. PlaySound returns
after the sound event completes. 
Re: PlaySound() problem
#3032
Author: Remy Lebeau (TeamB)
Date: Wed, 13 Sep 2006 16:51
10 lines
1212 bytes
"Paulo Buzinello" <NO_SPAM_paulo@buzinello.com> wrote in message
news:MPG.1f71b6aa6a729d32989680@newsgroups.borland.com...

> I need to wait the function play the entire music.

You need to use SND_SYNC instead of SND_ASYNC.


Gambit
Re: PlaySound() problem
#3038
Author: Paulo Buzinello
Date: Fri, 15 Sep 2006 08:28
8 lines
1039 bytes
Num passado nīŋŊo muito distante, Paulo Buzinello disse...
> PlaySound("dance.wav",0,SND_ASYNC)

  Ops. My fault.
  To play a sound asynchronously or even to stop it, I need
  to do it in the same instance.

  Thanks, friends.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads