BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

PlaySound() problem

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Native API)
View previous topic :: View next topic  
Author Message
Paulo Buzinello
Guest





PostPosted: Wed Sep 13, 2006 1:33 pm    Post subject: PlaySound() problem Reply with quote



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
Back to top
Bob Gonder
Guest





PostPosted: Wed Sep 13, 2006 9:10 pm    Post subject: Re: PlaySound() problem Reply with quote



Paulo Buzinello wrote:

Quote:
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.
Back to top
Remy Lebeau (TeamB)
Guest





PostPosted: Wed Sep 13, 2006 9:51 pm    Post subject: Re: PlaySound() problem Reply with quote



"Paulo Buzinello" <NO_SPAM_paulo (AT) buzinello (DOT) com> wrote in message
news:MPG.1f71b6aa6a729d32989680 (AT) newsgroups (DOT) borland.com...

Quote:
I need to wait the function play the entire music.

You need to use SND_SYNC instead of SND_ASYNC.


Gambit
Back to top
Paulo Buzinello
Guest





PostPosted: Fri Sep 15, 2006 1:28 pm    Post subject: Re: PlaySound() problem Reply with quote

Num passado não muito distante, Paulo Buzinello disse...
Quote:
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.
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Native API) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.