[vlc-devel] [PATCH] Use waveOutSetVolume to set volume instead of pure software gain

Rémi Denis-Courmont remi at remlab.net
Wed Jan 16 14:21:31 CET 2013

On Wed, 16 Jan 2013 14:14:02 +0100, Denis Charmet <typx at dinauz.org> wrote:
> Le mercredi 16 janvier 2013 à 01:11:20, Rémi Denis-Courmont a écrit :
>> What is the scope of an "instance"?
>> If I understand MSDN correctly, if the application provide a audio
>> session
>> GUID, then the "instance" (or rather the session) can be persistent and
>> shared across multiple processes. If the GUID is not specified, then
>> instance is probably not persistent. It is not clear to me.
> If I understand correctly what I see here :
> When using waveOut and Directsound API, the scope of the instance is the
> calling process. The sessions are not shared between processes.
>> There are no event interfaces for DirectSound and WaveOut. MSDN
>> two ways to get the volume set by the mixer:
>> - poll waveOutGetVolume(), or
>> - use the Windows Audio Session interfaces.
>> While playing, you could get reasonably fast response time by polling
>> waveOutGetVolume() from the Play() callback. During pause or stop,
>> either a
>> polling timer or WASAPI is required.
> Is it sane to use WASAPI inside legacy audio API based aout?

No. It would break support for Windows XP and duplicate code from

But it should be fairly easy to provide a WaveOut (and even DirectSound)
back-end to mmdevice.c as an alternative to the existing wasapi.c. Of
course, that raises the questions:
- What's the use of the DirectSound plugin on Vista and later?
- What's the use of the WaveOut plugin?

Rémi Denis-Courmont
Sent from my collocated server

More information about the vlc-devel mailing list