I'm developing software that receives PCM audio data and converts it to a WAVE file. The audio stream has the following characteristics:
- 16 bit signed integers
- 6000 frames sent every 1/8th seconds, ie 48000 samples per second
- Mono-channel
I can save to the file just fine, but the audio sounds distorted upon playback.
After doing some experimentation, I've determined that the audio is symmetric across the frequency domain, causing the strange distortions.
My question is: what would cause this?
Could it be reading the data using an incorrect sampling rate? Or some strange normalization? I don't have enough experience with FFT to understand the relationship between time and frequency domains.
If I move the audio file into Audacity and use the "change pitch" tool with +100% (effectively doubling the pitch), it sounds roughly normal. It seems like the entire frequency spectrum has been squished into 12kHz and the mirrored across the other 12kHz range.
Any help is appreciated, and more info can be provided if necessary!