Microsoft KB Archive/77696

{|
 * width="100%"|

&quot;Close Waveaudio&quot; Command Closes Open Waveaudio Device

 * }

Q77696

-

The information in this article applies to:


 * Microsoft Windows Software Development Kit (SDK) versions 3.0, 3.1

-

SUMMARY
In the Microsoft Windows environment, the &quot;close waveaudio&quot; MCI command string used with mciSendString no longer closes all open waveaudio devices. Using the MCI command string &quot;close waveaudio&quot; closes only the device opened as &quot;open waveaudio&quot;.

MORE INFORMATION
The previous behavior of the &quot;close waveaudio&quot; command string was to close all waveaudio devices in the system. This was considered &quot;rude&quot; behavior, because no application should be able to terminate another application's currently playing wave file. Therefore, this behavior was changed.

An application can terminate only the wave files that it has opened. Inside the application, &quot;close waveaudio&quot; closes only the device opened as &quot;open waveaudio,&quot; not a waveaudio device opened with the &quot;type waveaudio&quot; parameter as follows:

"open c:\mmwin\mmdata\laser.wav type waveaudio alias myfile" Therefore, a different approach is required to close all waveaudio devices in the application. Enumerate all waveaudio devices opened in that task and close them, as follows:

  sysinfo waveaudio quantity open     returns  sysinfo waveaudio name 1           returns name <1> close name 1 .        .         .   sysinfo waveaudio name n            returns name  close name n NOTE: It is not necessary to close all open waveaudio files to play another one. The restriction is that only one waveaudio file can be playing at once (assuming only one waveaudio output device).

Additional query words: 3.00 no32bit 3.10

Keywords : kb16bitonly

Issue type :

Technology : kbAudDeveloper kbWin3xSearch kbSDKSearch kbWinSDKSearch kbWinSDK300 kbWinSDK310