Page 1 of 1

rnd plays wav 48000 KHz too slowly

Posted: Sun Aug 02, 2015 4:55 pm
by armanelgtron
Rocksndiamonds plays WAV 48000 KHz files at the wrong speed and pitch. (sounds like a tape playing at the wrong speed). 44100 KHz WAV files work fine.

Re: rnd plays wav 48000 KHz too slowly

Posted: Mon Aug 03, 2015 6:25 pm
by Holger
R'n'D internally uses 22050 Hz, and SDL2_mixer downsamples WAV files with higher frequencies to this value. This should be true both for WAVs with 44100 Hz and 48000 Hz. I have tested this with WAV files in 22050, 44100 and 48000 Hz, and they all sound the same as when played with an external player (tested with SDL2's own "playwave2" binary, which internally works like R'n'D, and with the audio player "audacious").

Can you provide me with a test WAV file with 48000 Hz to reproduce this?

Maybe something's wrong with that WAV file, or I might have overseen a bug in my game.

Re: rnd plays wav 48000 KHz too slowly

Posted: Tue Aug 04, 2015 6:37 am
by filbo
What OS & version; what version of RnD; built by you, downloaded prebuilt from here, or built by your distro; what version and build pedigree of SDL libraries?

Re: rnd plays wav 48000 KHz too slowly

Posted: Thu Aug 06, 2015 1:50 am
by armanelgtron
filbo wrote:What OS & version; what version of RnD; built by you, downloaded prebuilt from here, or built by your distro; what version and build pedigree of SDL libraries?
Debian 7 Wheezy (64 bit)
3.3.0.1 SDL (built by debian)
snapshot51.png
snapshot51.png (16.66 KiB) Viewed 5912 times
I'll leave a thing whatever later.