Jump to content
  • Advertisement
Sign in to follow this  
loder

sound problemUrgent

This topic is 4069 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

PlaySound(TEXT("beach2.wav"), NULL, SND_FILENAME); i using above code to play my sound, sound can come out, but the my model cannot show and it lag at there. could anyone please help me see what problem i face now. thanks.

Share this post


Link to post
Share on other sites
Advertisement
now my model can work.but the sound cannot play.it sound "tu tu tu"sound.
what problem now??

thank you for helping me

Share this post


Link to post
Share on other sites
now sound can play already.

but if i wan to stop the sound.so what code should i use??

Share this post


Link to post
Share on other sites
To stop the sound that you played with
PlaySound(TEXT("beach2.wav"), NULL, SND_FILENAME|SND_ASYNC);
use PlaySound(NULL,NULL,SND_PURGE);
And here is the full documentation of PlaySound if you need anything else :

http://msdn2.microsoft.com/en-us/library/ms712879.aspx

Sorry for the lousy structure of the reply. I`m new to this forum.

Share this post


Link to post
Share on other sites
Quote:
Original post by nPenAPaT
To stop the sound that you played with
PlaySound(TEXT("beach2.wav"), NULL, SND_FILENAME|SND_ASYNC);
use PlaySound(NULL,NULL,SND_PURGE);
And here is the full documentation of PlaySound if you need anything else :

http://msdn2.microsoft.com/en-us/library/ms712879.aspx

Sorry for the lousy structure of the reply. I`m new to this forum.


u mean i need to put tis code PlaySound(NULL,NULL,SND_PURGE); below PlaySound(TEXT("beach2.wav"), NULL, SND_FILENAME|SND_ASYNC);??

i also new in this forum also.

if i wan the sound looping.so what is the code?? sorry ask u so many question..

thank you.

Share this post


Link to post
Share on other sites
Use PlaySound(NULL,NULL,SND_PURGE); to stop a sound when you want to.
To start a loop use
PlaySound(TEXT("beach2.wav"), NULL, SND_FILENAME|SND_ASYNC|SND_LOOP);
and if you want to stop the loop use PlaySound(NULL,NULL,SND_PURGE);

Share this post


Link to post
Share on other sites
if i use this code to play my sound.

case 'l':
PlaySound(TEXT("linkin2.wav"), NULL, SND_FILENAME|SND_ASYNC);
RenderScene();

then how i put a code to stop it??
and how can i make sure the sound will auto loop??

if i nedd to play different sound, is that posible?

pls help me.
i need to pass up my project monday.

thank you for you help.

Share this post


Link to post
Share on other sites
Quote:
Original post by nPenAPaT
Use PlaySound(NULL,NULL,SND_PURGE); to stop a sound when you want to.
To start a loop use
PlaySound(TEXT("beach2.wav"), NULL, SND_FILENAME|SND_ASYNC|SND_LOOP);
and if you want to stop the loop use PlaySound(NULL,NULL,SND_PURGE);


many many thanks.its help alot.

i use this to play two sound:


case 'l':
PlaySound(TEXT("beach2.wav"), NULL, SND_FILENAME|SND_ASYNC|SND_LOOP);
RenderScene();
break;
case 'j':
PlaySound(TEXT("linkin2.wav"), NULL, SND_FILENAME|SND_ASYNC|SND_LOOP);
RenderScene();
break;
case 'k':
PlaySound(NULL,NULL,SND_PURGE);
RenderScene();
break;

it work perfectly.hehe...you solve my problem.thanks.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!