Hi everyone, sorry to disturb you again, and sorry if any of this sounds silly, my understanding of audio is very weak...
I am using AudioPlaySdRaw to play raw files from the SD card. It seems to work very well but the samples seem to play at half speed. I did some experimenting on the conversion.
Wav file at bit rate 44100 -> Raw file at 44100 run at (approx, I haven't measured) half speed.
Wav file at bit rate 44100 -> Raw file at 16000 run at (approx) correct speed.
Am I on a wild goose chase, or should I use 16000 as the bitrate when converting? Here are my conversion command, using sox,
sox sounds/wavs/kick8.wav --bits 16 --encoding signed-integer --endian little --rate 44100 sounds/samples/kick8.raw #runs slow
sox sounds/wavs/kick8.wav --bits 16 --encoding signed-integer --endian little --rate 16000 sounds/samples/kick8.raw #runs about right
FWIW I did look at the code in AudioPlaySdRaw and saw a constant AUDIO_SAMPLE_RATE_EXACT / 2.0, so maybe the rate I am really looking for is 22050 ?
Again I am really not good at this stuff, so sorry anything I say sounds very silly, and as ever thanks for your help.
I am using AudioPlaySdRaw to play raw files from the SD card. It seems to work very well but the samples seem to play at half speed. I did some experimenting on the conversion.
Wav file at bit rate 44100 -> Raw file at 44100 run at (approx, I haven't measured) half speed.
Wav file at bit rate 44100 -> Raw file at 16000 run at (approx) correct speed.
Am I on a wild goose chase, or should I use 16000 as the bitrate when converting? Here are my conversion command, using sox,
sox sounds/wavs/kick8.wav --bits 16 --encoding signed-integer --endian little --rate 44100 sounds/samples/kick8.raw #runs slow
sox sounds/wavs/kick8.wav --bits 16 --encoding signed-integer --endian little --rate 16000 sounds/samples/kick8.raw #runs about right
FWIW I did look at the code in AudioPlaySdRaw and saw a constant AUDIO_SAMPLE_RATE_EXACT / 2.0, so maybe the rate I am really looking for is 22050 ?
Again I am really not good at this stuff, so sorry anything I say sounds very silly, and as ever thanks for your help.