following this great tutorial Android Making Waves I'm finally able to facing with cpp dsp programming using AAUDIO lib for low latency audio.
this tutorial explain how to archive monophonic sound, by chanching AAudioStreamBuilder_setChannelCount to "2" the sound becomes stereo but distorted,
AAudioStreamBuilder *streamBuilder;
AAudio_createStreamBuilder(&streamBuilder);
AAudioStreamBuilder_setFormat(streamBuilder, AAUDIO_FORMAT_PCM_FLOAT);
AAudioStreamBuilder_setChannelCount(streamBuilder, 1);
AAudioStreamBuilder_setPerformanceMode(streamBuilder, AAUDIO_PERFORMANCE_MODE_LOW_LATENCY);
AAudioStreamBuilder_setDataCallback(streamBuilder, ::dataCallback, &oscillator_);
AAudioStreamBuilder_setErrorCallback(streamBuilder, ::errorCallback, this);
based on this tutorial do you know how to make the dsp stereo? practically split the signal and then be able to apply an amplitude control on each channel to archive the PAN effect
Here's how to do it: