hi all,
(just in case: sorry for double posting, i first sent from a non-subscribed address)
this might have been discussed already ages ago, but i didn't find much on the web, and i'm a bit confused why it happens, so:
i'm developing/bugfixing an application using (well, obviously) alsa, and i get crashes with assertions.
my setup: - nvidia CK804 onboard soundcard (this soundcard seems to only be able to run at 48kHz) - debian squeeze/sid (libasound2 1.0.23-1)
what i'm trying to do: i'm requesting my "plughw" device with 44100Hz the request is done with something like: rate=44100; err = snd_pcm_hw_params_set_rate_min(handle, params, &rate, 0); [...] err = snd_pcm_hw_params(handle, params);
what happens: in the snd_pcm_hw_params(), my program exits with: "interval_inline.h:52: snd_interval_single: Assertion `!snd_interval_empty(i)' failed."
sidenotes: if i use the "hw" device, i get away with the wrong samplerate (no crash, though the requested samplerate does not take effect)
now i understand, that my soundcard does not accept 44100Hz. what i don't understand is, that alsa-lib crashes with an assertion error. i expect snd_pcm_hw_params() return an error!=0 if it fails to do what it is asked to do. imho, a library should _never ever_ crash the application.
is this a bug? in alsa-lib? in the debian-packages?
fgmasdr IOhannes