The presented solution for the stereo player has a little problem in that the first sample will be left out, if the gReadPointer
is incremented at the beginning of the for-loop.
So either you have to initialise the gReadPointer
to -1
both at the beginning and inside the loop, or you just move the increment to the end of the for-loop.