The World’s Largest Online Community for Developers
I want to develop an application for Android that allows you to apply a 3D sound effect when playing streaming music.
The effect that I would like to achieve is the possibility to change the virtual position of the speaker in a 3D space when the user is listening to music with headphones, i.e. be able to locate sounds in three dimensions: in range (distance), in direction above and below (elevation), in front and to the rear, as well as to either side (azimuth).
I am using
AudioFx for basic audio effects such as:
Virtualizer. None of the effects made available by AudioFx allow you to apply 3D effects.
In a nutshell, I would like for Andorid the equivalent of the
AVAudioEnvironmentNode function available for IOS.
The official documentation of the
The methods, parameter types and units exposed by the Virtualizer implementation are directly mapping those defined by the OpenSL ES 1.0.1 Specification (http://www.khronos.org/opensles/) for the
SLVirtualizerItfinterface. Please refer to this specification for more details.
The AudioFx effects therefore use interfaces implemented in
The OpenSL ES specification 1.1 demonstrates the implementation for 3D audio, through the
SL3DLocationItf interface, which looks just what I'm looking for.
If there is no function/library that allows to apply 3D audio effects, what is the least painful way to use OpenSL
SL3DLocationItf interface in combination with my current implementation of the MediaPlayer and Audiofx?
It would be perfect extend the AudioFx library to add only the 3D effect, thus avoiding having to work with
JNI to reimplement, in practice, a new Media Player just to add an audio effect (too much overhead).
Any help and suggestions would be greatly appreciated.