DOCUMENT:Q77696 06-NOV-1999 [win16sdk] TITLE :"Close Waveaudio" Command Closes Open Waveaudio Device PRODUCT :Microsoft Windows Software Development Kit PROD/VER:WINDOWS:3.0,3.1 OPER/SYS: KEYWORDS:kb16bitonly ====================================================================== ------------------------------------------------------------------------------- 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 "close waveaudio" MCI command string used with mciSendString() no longer closes all open waveaudio devices. Using the MCI command string "close waveaudio" closes only the device opened as "open waveaudio". MORE INFORMATION ================ The previous behavior of the "close waveaudio" command string was to close all waveaudio devices in the system. This was considered "rude" 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, "close waveaudio" closes only the device opened as "open waveaudio," not a waveaudio device opened with the "type waveaudio" 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 Technology : kbAudDeveloper kbWin3xSearch kbSDKSearch kbWinSDKSearch kbWinSDK300 kbWinSDK310 Version : WINDOWS:3.0,3.1 ============================================================================= THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY. Copyright Microsoft Corporation 1999.