I'm using OpenSL ES in Android to decode and play an mp3 file using an AndroidSimpleBufferQueue. This works fine until you connect a bluetooth headset, at which point performance comes down to a crawl, and playback is very slow and stutters. Any ideas on how to fix this?
edit: I seem to have narrowed it down to the buffer queue portion of it. If I just load and play the sound file, it seems to work fine, but with a buffer queue in the middle, performance is terrible. I need the buffer queue to manipulate the data, so any help figuring this out is appreciated.
edit2: It appears that the minimum acceptable buffer size changes when bluetooth is connected. I was using a 4096 buffer, but to get acceptable/uninterrupted audio playback with a bluetooth headset, I had to bump it up to 16384. The latency on that is, however, kind of unacceptable for my needs, so I'm still looking for suggestions on how to improve this.