INF: "Close Waveaudio" Command Closes Only 1 Waveaudio Device

ID Number: Q77696

1.00

WINDOWS

Summary:

In the Microsoft Multimedia Windows environment, the "close waveaudio"

command no longer closes all open waveaudio devices. "Close waveaudio"

closes only the device opened as "open waveaudio."

The previous behavior of the "close waveaudio" command closed 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

functionality was eliminated.

An application can terminate only wave files 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 <n>

sysinfo waveaudio name 1 returns name <1>

close name 1

.

.

.

sysinfo waveaudio name n returns name <n>

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 reference words: 1.00