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 >>>;
_______________________________________________
chuck-users mailing list
chuck-users@lists.cs.princeton.edu
https://lists.cs.princeton.edu/mailman/listinfo/chuck-users

Reply via email to