Question

I am dealing with a legacy code that uses portaudio on windows. The code grabs audio from desktop mic and has ability to configure input volume. It worked perfectly under windows xp, but tuning audio input level is broken under windows 7, changing the parameter has no effect on output audio stream. Code do the following to adjust volume

mp_mixer = Px_OpenMixer(mp_inputStream, m_dev_num);
if(mp_mixer) Px_SetInputVolume(mp_mixer, m_volume);

I have discovered, that underling winmme functions does not work in Windows Vista and newer. I have updated to last version of portaudio pa_stable_v19_20140130 in which Mixer functions are not available anymore. I can't find alternative way to adjust input volume in portsound, Is there any?

Was it helpful?

Solution

I think you are going to have to use the Audio Endpoint Device API. http://msdn.microsoft.com/en-us/library/windows/desktop/dd370793(v=vs.85).aspx

Like you said the WMME mixer API is no longer supported.

The API isn't too bad. Just make sure you use the portaudio API device index to identify the device in the mixer API.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top