Why does the sound play faster I am trying to duplicate a stereo channel into four channels.
When I do that the sound plays twice as fast. it's PCM raw data
Basically trying to copy the stereo bytes into four channel buffer.
In Audacity
16kHz plays faster.
8KHz can hear it perfectly.
Let Sic be the i-th sample of the c-th channel, you started with stereo (2-channel) 16kHz. Your audio was like this
 s11, s12, s21, s22, s31, s32, s41, s42, s51, s52
When you made it a 4-channel audio you reassigned the same infromation to different channels like this
 s11, s12, s13, s14, s21, s22, s23, s24
In the stereo configuration you were using 2 samples every sampling period, so at 16kHz you play 32000 samples per second. With four channel you use 4 samples every sampling period, if you want to play 32000 samples per second your sampling rate needs to be 32000/4, 8kHz.