[chuck-users] SndBuf - audio file with samplerate different from 44100
mario buoninfante
mario.buoninfante at gmail.com
Sat Mar 24 08:48:24 EDT 2018
Hi,
It seems like SndBuf deals in a different way with audio files which
have different sample rate.
I tried this simple program where the 2 audio files samples are compared
(perc.wav and perc2.wav which are the same file one 44100 and the other
48000 Hz sample rate), so that I can check if they are different. it
looks like for SndBuf they are different. am I missing something? does
SndBuf convert in some way the audio files?
cheers,
Mario
SndBuf sample => blackhole;
SndBuf sample2 => blackhole;
sample.read("perc.wav");
sample2.read("perc2.wav");
<<< sample.length(), sample2.length() >>>;
0 => int err;
for(0 => int c; c<sample.samples(); 1 +=> c){
if((sample.valueAt(c) - sample2.valueAt(c)) != 0){
1 +=> err;
}
}
<<< err >>>;
More information about the chuck-users
mailing list