0

Is it possible to play 2 different sounds simultaneously from 2 built-in speakers (1=main speaker, 2=earpiece speaker) on Android, preferably using Oboe C++ library.

In this thread, it was asked a similar question, but for 2 different audio devices. In my case, I just want to play on the same audio device but through 2 different speakers.

It was possible to record data from built-in microphones simultaneously using stereo channels. A similar approach for speakers didn't work.

Any help much appreciated, thank you.

Note:

The term Audio Device refers to a device capable of receiving or sending audio. An audio device can have multiple microphones and/or speakers attached to it, and these are represented as different channels.

Debugging device is Google Pixel XL running Android 9

Bek
  • 1
  • 4

1 Answers1

0

If the audio device has 2 speakers then you should be able to play different sounds through each speaker by supplying different data to each channel.

However, I believe the speakers you're referring to:

2 built-in speakers (1=main speaker, 2=earpiece speaker)

are actually 2 separate audio devices each with a single speaker. In which case you won't be able to use them at the same time, although hacks might be available to make the speakers part of the same audio device (I haven't tried this).

donturner
  • 17,867
  • 8
  • 59
  • 81