3

I have got the following situation. On a machine there is a Fritz ISDN card. There is a process that is responsible for playing a certain wave file on this device's wave out (ISDN connection is made at startup and made persistent). The scenario is easy, whenever needed the process calls waveOutWrite() on the previously opened wave device (everything initialized without any problems of course) and a callback function waits for MM_WOM_DONE msg to know that the playback has been finished.

Since a few days however (nothing changed neither in the process nor the machine) the MM_WOM_DONE message has been coming immediately after calling waveOutWrite() even though the wave lasts a couple of seconds. Again no error is reported, it looks like the file was played but had zero length (which is not the case). I am also sure that waveOutReset() was not called by my process (it would also trigger sending the mentioned message). I have already used to have some strange problems in the past that where solved simply by reinstalling TAPI drivers. This time for some reason it is problematic for me to perform that once again and I am trying more analytical approach :). Any suggestions what might cause such a behavior? Maybe something on the other end of the ISDN line?

Onur A.
  • 3,007
  • 3
  • 22
  • 37
Piotr Tyburski
  • 651
  • 6
  • 11

3 Answers3

3

Based on your description, you are doing the playing asynchonously. Are you sure that the backing memory for the wav file is not being cleaned up in that time?

Jack Bolding
  • 3,801
  • 3
  • 39
  • 44
2

I don't have the time to Google too much for this, but I know that either Larry Osterman or Raymond Chen blogged about a similar situation.

I'll check back later when I have more time to see if this question is still open.

Stu
  • 15,675
  • 4
  • 43
  • 74
  • http://blogs.msdn.com/larryosterman/archive/2009/02/19/playsound-xxx-snd-memory-snd-async-is-almost-always-a-bad-idea.aspx – Billy ONeal Apr 13 '10 at 00:42
0

What is the return value when the sound does not play? If you get MMSYSERR_NOERROR that points to the driver incorrectly reporting to the OS that the buffer was processed.

Has the WAV file itself changed? This blog entry indicates that some pretty in-depth validation is done on the metadata.

Aidan Ryan
  • 11,389
  • 13
  • 54
  • 86