addSource() with stereo

From the C API:

SoundSource* playdate->sound->addSource(AudioSourceFunction* callback, void* context, int stereo)

The callback argument works as expected: a function pointer to the handler routine. context is also intuitive: any pointer given in addSource() is also available in the callback.

stereo isn't doing what I expect, however. Whether I set it to 0, 1 or 2, output always seems to be mono. In my test, I'm computing different levels for the left and right outputs, but the headphones are definitely receiving the same audio in both ears.

Is there maybe some other setting I need to be using to activate a global stereo mode?

Disregard, apparently. Tried it again when I got home from work and it's behaving now. I must have messed something up before.

Set stereo to 1 for stereo output, or leave it at 0 for mono.

1 Like