Android Question Different audio out on left and right channels

Discussion in 'Android Questions' started by andreahaku, Jan 19, 2015.

  1. andreahaku

    andreahaku Member Licensed 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
     
  2. andreahaku

    andreahaku Member Licensed 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
     
  3. Rick Harris

    Rick Harris Well-Known Member Licensed User

    Your solution only makes it possible to alternate the left and right channel.
    Is there a way to play totally different audio simultaneously via the left and right channel?
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice