Hi,

I have the following code for my sound setup:

...

DPRINTF("got %d channels to allocate\n", chancnt);

if ((err = snd_pcm_hw_params_set_channels (handle, hw_params, chancnt))<
0) {
      DPRINTF("ALSA: cannot set channel count to %d\n", chancnt);
      return -1;
}

DPRINTF("trying to set periods to %d\n", nperiods);

if ((err = snd_pcm_hw_params_set_periods_near(handle, hw_params,
                                                      nperiods, 0)) < 0)
{
  DPRINTF("ALSA: failed to set period count near %d\n", nperiods);
  DPRINTF("%s\n", snd_strerror(err));
                return -1;
}

...

In the case I want to setup my SBLive for recording and I try to do
set_periods_near alsa lib is exiting with the following error:

configure_pcm: got 2 channels to allocate
configure_pcm: trying to set periods to 4
glame: interval.c:159: snd_interval_refine: Assertion
`!snd_interval_empty(i)' failed.
Aborted

What's happening here? The same code works fine with my SB AWE 32. It's
not tolerable that the lib exits the application anyway. I want to get
an error to do my own error handling! I even compiled with debug=no!
The assertions in the alsa lib are a real pain...
Does anyone know, what's is wrong when I try to set the periods to 4
when recording with the SB Live?

Cheers, Alex



_______________________________________________
Alsa-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-devel

Reply via email to