Well, while that correction is welcome to avoid problems when people use mono buffers, I don’t think it was the problem I faced, because I was clearly using a stereo buffer, but only “filling” the first channel and leaving the second one empty (through initial clear()).
Strangely, both channels were heard on the Android app, but the right side one had light cracks and pops. Anyway, I found that workaround (using both times the first channel) so I’m not stuck with it, but in case someone once finds an explanation, I’d be happy to hear it.
In my AudioSource callback (getNextAudioBlock) I clear the whole buffer with bufferToFill.clearActiveBufferRegion(), then fill up only the first channel with my audio data (through SamplerVoice). On desktop (DirectSound device), I only hear left ear (very slight sound on right ear, but I suspect the headphones to do that). On Android device however, I hear both ears, but left one has slight clicks/pops.
If I then go to juce_android_Audio.cpp and limit the loop above to 1 iteration, then I only hear left ear. So only solution that worked was to copy the same first channel on both output device channels; that worked perfectly, though of course it’s far from ideal, specially if you need stereo (not in this case).
Sorry for all the trouble. Again, there’s no urgency here. Just trying to understand where those mysterious cracks come from (possibly somewhere between the audio source getNextAudioBlock and then original AndroidAudioIODevice thread)