On 11/13/2014 02:17 PM, Andreas Wehrmann wrote: > Hello everybody! > > In one of my Windows applications I needed the ability to control the > input volume of the audio devices used there. > Unfortunately, only setting the output volume was implemented so I > updated the WMME backend to also support > setting/getting the input volume. > > Please review the code and consider merging it into upstream. > > Note: > - I was unable to test the code with audio devices that have more than > one input channel (I don't have any of these). > - When querying the input volume, the volume of the first channel will > be returned only* > - When setting the input volume, it will be applied to all channels of > the device* > - The patch is against pjproject 2.3 > > * That's not an issue if the WMME controls indicate "uniform" settings > (meaning the setting of one channel is applied to all the other > channels; see the code) > > What might need to be revisited is the return of error codes from the > new function 'wave_mixer_control' > because I wasn't sure on how to introduce a new ERRNO range for this. > There's already PJMEDIA_AUDIODEV_ERRNO_FROM_WMME_IN() > and PJMEDIA_AUDIODEV_ERRNO_FROM_WMME_OUT() > and now something like PJMEDIA_AUDIODEV_ERRNO_FROM_WMME_MIXER() would > be needed... I think? > > > Best regards, > > Andreas Wehrmann > The previous patch contained an error: 'wave_mixer_control' would return an unexpected value type if opening the mixer/querying the mixer ID failed. Oops :-( -------------- next part -------------- A non-text attachment was scrubbed... Name: wmme_dev_input_volume.patch Type: text/x-diff Size: 12102 bytes Desc: not available URL: <http://lists.pjsip.org/pipermail/pjsip_lists.pjsip.org/attachments/20141113/e3b7d6f5/attachment.patch>