[android-developers] Re: Playing two audio files at once
Use audio track and mix any source to any channel. http://developer.android.com/intl/de/reference/android/media/AudioTrack.html On May 17, 10:13 am, Raghav Sood raghavs...@gmail.com wrote: Hi, Is it possible to play two audio files at once, one of which is played through the right earphone and the other through the left? Is it even possible to send different audio to each earphone? Thanks -- Raghav Soodhttp://www.raghavsood.com/http://www.androidappcheck.com/http://www.telstop.tel/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
[android-developers] Re: Playing two audio files at once
On Tuesday, May 17, 2011 2:13:32 AM UTC-4, Gheter wrote: Is it possible to play two audio files at once, one of which is played through the right earphone and the other through the left? Is it even possible to send different audio to each earphone? You probably can't do it with the media player framework, but I believe you can play linearly sampled buffers of arbitrary stereo data with reasonable channel isolation. So if you run two (supplied by you) audio file codec processors, deal with any sample rate mismatch, and then direct the data to the left and right channels of stereo buffers, you should be able to do it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en
Re: [android-developers] Re: Playing two audio files at once
Thanks, I should be able to do it now. On Tue, May 17, 2011 at 12:25 PM, Chris Stratton cs07...@gmail.com wrote: On Tuesday, May 17, 2011 2:13:32 AM UTC-4, Gheter wrote: Is it possible to play two audio files at once, one of which is played through the right earphone and the other through the left? Is it even possible to send different audio to each earphone? You probably can't do it with the media player framework, but I believe you can play linearly sampled buffers of arbitrary stereo data with reasonable channel isolation. So if you run two (supplied by you) audio file codec processors, deal with any sample rate mismatch, and then direct the data to the left and right channels of stereo buffers, you should be able to do it. -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en -- Raghav Sood http://www.raghavsood.com/ http://www.androidappcheck.com/ http://www.telstop.tel/ -- You received this message because you are subscribed to the Google Groups Android Developers group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en