Correct sound api to Use-Collection of common programming errors
msdn I am using native (C++) to develop a game which can play sounds. I want to play sound from memory and not from open files. so using sndPlaySound with the flag SND_MEMORY. which works well. Now the problem starts , there are no event to know when the sound stopped or not even a call to stop the sound.The other set of Api’s i.e SndOpen requires a filename and not a raw buffer.
SO how do I play , stop and receive events for a sound when given raw data pointer to the system runtime?
msdn1 Hi aajustin,Please take a look at following article for playing sound in WM platform:- Playing multiple wave files continuously and simultaneously
May 15, 2003. Windows has various APIs for outputting wave files. The simplest way is to use PlaySound(), which I bet you have already used. It seemed to work fine – until you realized it is unable to play more than one wave at the same time, which makes it useless for purposes like game sound effects. On this article I’ll explain how to turn around this limitation, but for that we’ll have to forget about the so-beautiful PlaySound(), and take a look at the waveOut interface. It is a bit scary at first sight (specially for those used to PlaySound), but I’ll try to take it easy by using only what we really need from it. - QA: How can I change sound volume from my program?
October 02, 2001. I need to change sound volume from my program. It could be changed in the Control Panel in Sounds & Reminders applet but I need to change sound from my program. How can I do it? - Play wav sounds on Pocket PC
August 23, 2001. There are several functions on Pocket PC that can be used for playing sounds in your programs. These are: PlaySound, MessageBeep, waveOutWrite and other waveOut… functions. This article covers working with a PlaySound function. In it, there is a description how to play a .wav file, play a sound from resources and play a .wav file located in memory. - Playing audio on a Pocket PC
September 20, 2001. It is not easy to play a custom sound on Pocket PC, there are a lot of questions in newsgroups. This article describes using waveOut… functions for playing custom sounds. You will be able to use the information and the sample to play active sounds in your games or any other applications.
Best regards,
Guang-Ming Bian – MSFT
- Playing multiple wave files continuously and simultaneously
msdn2 Hi aajustin,Please take a look at following article for playing sound in WM platform:- Playing multiple wave files continuously and simultaneously
May 15, 2003. Windows has various APIs for outputting wave files. The simplest way is to use PlaySound(), which I bet you have already used. It seemed to work fine – until you realized it is unable to play more than one wave at the same time, which makes it useless for purposes like game sound effects. On this article I’ll explain how to turn around this limitation, but for that we’ll have to forget about the so-beautiful PlaySound(), and take a look at the waveOut interface. It is a bit scary at first sight (specially for those used to PlaySound), but I’ll try to take it easy by using only what we really need from it. - QA: How can I change sound volume from my program?
October 02, 2001. I need to change sound volume from my program. It could be changed in the Control Panel in Sounds & Reminders applet but I need to change sound from my program. How can I do it? - Play wav sounds on Pocket PC
August 23, 2001. There are several functions on Pocket PC that can be used for playing sounds in your programs. These are: PlaySound, MessageBeep, waveOutWrite and other waveOut… functions. This article covers working with a PlaySound function. In it, there is a description how to play a .wav file, play a sound from resources and play a .wav file located in memory. - Playing audio on a Pocket PC
September 20, 2001. It is not easy to play a custom sound on Pocket PC, there are a lot of questions in newsgroups. This article describes using waveOut… functions for playing custom sounds. You will be able to use the information and the sample to play active sounds in your games or any other applications.
Best regards,
Guang-Ming Bian – MSFT
- Playing multiple wave files continuously and simultaneously
msdn3 hello , none of the above links work.
msdn4 Hi Ssachin,Sorry for it, I have correct the link, they work now.Best regards,Guang-Ming Bian – MSFT
msdn5 Thank you sir. ThankYou sachinijesukaran