Android Question Different audio out on left and right channels

andreahaku

Member
Licensed User
Longtime User
Hi everyone,
I have to develop an app that generates sounds but different sounds on the left and right audio channels.
Is it possible? If so how?
Thanks everyone.
Cheers,
Andrea
 

andreahaku

Member
Licensed User
Longtime User
I answer myself :)

I made a test and I'm able to achieve that result by using the "SetStereoVolume" command of the AudioTrack library.

By using the
at.SetStereoVolume(at.GetMaxVolume,at.GetMinVolume)
I set the volume of the right channel to 0 and the audio is sent only to the left channel.

Vice versa with
at.SetStereoVolume(at.GetMinVolume,at.GetMaxVolume)
I set the volume of the left channel to 0 and the audio is sent only to the right channel.

I hope this may be useful in the future.

Andrea
 
Upvote 0
Top