AudioManager
has a setParameters method that accepts a Key-Value pair in string representation ("parameter_name=parameter_value").
Internally, it calls native AudioSystem.setParameters
.
The only way to get a parameter value is if you know its name, by calling AudioManager.getParameters
method which calls the corresponding native method in `AudioSystem'.
Is there a way (using reflection or other techniques) to get a list of supported parameters (of course the result will be dependent on the device it is called on as it is platform-specific)?
After brief investigation I can guess that there is no reliable way to enumerate all available keys for audio device parameters. Android headers define small set of general parameters, that probably should be supported by all devices. You can find actual keys here (look for
AUDIO_PARAMETER_*
macros). And interface to actual device implementationstruct audio_hw_device
(that is implemented by vendor) has onlyget_parameters()/set_parameters()
and no enumeration entry points. So, there is no way to request full list of supported parameter keys.To top it off:
Any correctives are welcome.