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

<p>Since a few days however (nothing changed neither in the process nor the machine) the <code>MM_WOM_DONE</code> message has been coming immediately after calling <code>waveOutWrite()</code> 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 <code>waveOutReset()</code> 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 <strong>TAPI</strong> 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 <strong>ISDN</strong> line?</p>

[{'answer_id': 11138, 'author': 'Stu', 'author_id': 414, 'author_profile': 'https://Stackoverflow.com/users/414', 'pm_score': 2, 'selected': False, 'text': "<p>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.</p>\n\n<p>I'll check back later when I have more time to see if this question is still open.</p>\n"}, {'answer_id': 14477, 'author': 'Aidan Ryan', 'author_id': 1042, 'author_profile': 'https://Stackoverflow.com/users/1042', 'pm_score': 0, 'selected': False, 'text': '<p>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.</p>\n\n<p>Has the WAV file itself changed? This <a href="http://blogs.msdn.com/larryosterman/archive/2007/07/24/playsound-is-failing-on-vista-what-s-wrong.aspx" rel="nofollow noreferrer">blog entry</a> indicates that some pretty in-depth validation is done on the metadata.</p>\n'}, {'answer_id': 129383, 'author': 'Jack Bolding', 'author_id': 5882, 'author_profile': 'https://Stackoverflow.com/users/5882', 'pm_score': 2, 'selected': False, 'text': '<p>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?</p>\n'}]
['https://Stackoverflow.com/questions/9629', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2090742/']