[ecasound] sample rate madness

New Message Reply Date view Thread view Subject view Author view Other groups

Subject: [ecasound] sample rate madness
From: Kali Griffin (kgriffin@cs.oberlin.edu)
Date: Sat Oct 16 1999 - 00:02:06 EEST


I am trying to make an application that resamples music from audio
files and that takes in music at various sample rates from /dev/dsp:

right now my problem has to do with resampling, I have the following
code bit:

    ECA_SESSION esession;
    ECA_CONTROLLER ectrl (&esession);
    
    AIO_PARAMS in_aio_params;
    
    ectrl.new_chainsetup("default");
    ectrl.activate_chainsetup("default");
    ectrl.add_audio_device(in.wav, ECA_CONTROLLER::input);
    ectrl.get_audio_format(in.wav, &in_aio_params);
    ectrl.add_audio_device(out.raw, ECA_CONTROLLER::output);
    ectrl.set_audio_format(16,2,22050);
    
    ectrl.connect_active_chainsetup();
    
    ECA_PROCESSOR emain (&esession);
    
    emain.exec();

This spits my output out at 44,100. should this be the case, or am
I doin something screwy? also, if I were reading in from /dev/dsp
is there a way I can make the sound card read in at some specific
sampling rate rather than making the processor do resampling? thanks.
-kali


New Message Reply Date view Thread view Subject view Author view Other groups

This archive was generated by hypermail 2a24 : Sat Oct 16 1999 - 00:02:56 EEST