Subject: Re: [ecasound] Changing internal sample rate
From: Kai Vehmanen (firstname.lastname@example.org)
Date: Wed Oct 27 1999 - 01:48:20 EEST
On Mon, 25 Oct 1999, Kali Griffin wrote:
> SAMPLE_BUFFER::set_sample_rate(long int)
> at the beginning of my program for changing the internal sample rate.
> This caused my program to just hang, not to crash, but to just hang
Hmm, have you tried to debug your program with gdb? ...
set_sample_rate() just assigns a new value to SAMPLE_BUFFER's static
member variable 'sample_rate', so it should not hang or crash in any
situation. If you send me your code (privately), I'll take a look.
> The reason why i dont want to resample is because this sounds
> crappy when reading in from /dev/dsp. I figured that maybe changing
> internal sample rate would make things a little bit cleaner. thanks in
Yes, this is indeed the best way to go. Resampling should be avoided
whenever possible. I could add better resampling routines to ecasound,
but as ecasound is designed for realtime multirack processing, these
advanced algorithms are just too heavy (computationally). Using
simple linear interpolation is fast, but aliasing and distortion
occur in many situations.
-- Kai Vehmanen <email@example.com> -------- CS, University of Turku, Finland . http://www.wakkanet.fi/ecasound/ - linux audio processing . http://www.wakkanet.fi/sculpscape/ - ambient-idm-rock-... mp3/ra/wav . http://www.wakkanet.fi/kerttulin_listat/ - music&movies (in Finnish)
This archive was generated by hypermail 2a24 : Wed Oct 27 1999 - 18:17:46 EEST