[Openal-devel] Volume Control extension
Guilherme Balena Versiani
guibv at comunip.com.br
Thu Jul 23 09:33:53 PDT 2009
Hi,
Thank you all for your valuable answers. But I've done some
considerations below:
Jason Daly wrote:
> Chris Robinson wrote:
>> On Tuesday 21 July 2009 7:16:09 pm Guilherme Balena Versiani wrote:
>>
>>> Hi,
>>>
>>> I am using OpenAL in a VoIP spacialization environment and now I want
>>> to control the system sound volume.
>>>
>>
>> Normally, you'd set the listener's gain to control the output volume of the
>> app, or the source gain to control the volume of the individual sources. It
>> won't affect other applications, but is there a reason you need to?
>>
>
> Most people consider this bad form, anyway. Your app should handle
> its own gain, but leave other apps alone. In most cases, you don't
> really know what else the user is doing, so you shouldn't presume to
> manipulate global settings.
>
> This is the main reason OpenAL doesn't have this capability. It's not
> really part of its job. I suppose you could make the argument that a
> cross-platform audio mixing control library would have value, but
> that's outside the scope of OpenAL.
I understand everything you said from the point of view of the
programmers (being a programmer I share this same point of view when
inspecting application's architecture and system's organization).
But trying to think from the point of view of an user, there is a
necessity of control the volume of the application, just as you said,
independent from the other opened applications (not system-wide). Now,
if you see exactly what the gain control does, you will see the problem:
it is just a gain (increase/descrease of energy) relative to other
sources (please correct me if I am wrong, I am supposing based on what I
found in OpenAL open source code); so if the volume of the application
is low, for instance, there is no improvement of gain done on current
OpenAL that will satisfy the need of the user that wants to hear what
the program is playing louder. From my point of view, if OpenAL intends
to be a more valuable 3D audio environment, it should control the audio
volume. I know Windows XP does not have this kind of volume control
isolation per application; this feature appeared in Windows Vista. So my
idea is to make a kind of control that does the best, based on available
operating system resources, to attend what the user wants
(increase/descrease the sound that he/she is listening). The final work
should be a code similar to the "old OpenAL Windows open code", that
tries several mechanisms available on the system.
There is another simple necessity too for the OpenAL capture extension:
to control the microphone input volume (a kind of AGC for the input)
just before encode the audio, for instance, to be streamed -- this can
improve the audio quality perceived from the remote point. You can be
thinking "hey, just apply some gain (a multiplier) in the input", but if
you do, you will have a thing named "amplification of quantization noise"...
So, based in these two arguments, my opinion is that this kind of job is
inside the scope of OpenAL.
Regards,
--
*Guilherme Balena Versiani*
/Software Architect
ComunIP S/A
/
More information about the Openal-devel
mailing list