[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[iiwusynth-devel] Re: [PlanetCCRMA] Re: building swami for 0.2.4-iiwusyn
From: |
Josh Green |
Subject: |
[iiwusynth-devel] Re: [PlanetCCRMA] Re: building swami for 0.2.4-iiwusynth |
Date: |
09 Mar 2003 01:38:55 -0800 |
On Fri, 2003-03-07 at 15:47, Fernando Pablo Lopez-Lezcano wrote:
> > Apparently you cannot pass to snd_pcm_drop a handle that is not running
> > (or at least set up successfully to run). I found this workaround in
> > current (yesterday's) CVS:
> >
> > In src/iiwu_alsa.c, line 529 comment out the call to snd_pcm_drop.
> > Rebuild iiwusynth --> swami works fine!... Josh: I'm pretty sure this is
> > not the "right" fix, something other than handle in the dev structure
> > has to be checked to make sure that snd_pcm_drop is only called if the
> > pcm is actually running (my guess).
>
> This is better and works in my case, it checks for the current state of
> the PCM and only drops if it is not just "OPEN".
>
> -- Fernando
Good find :) It would be good to improve Swami's ability to recover from
this type of problem (plugin crashes). Perhaps starting Swami the first
time should not load any plugins and present a dialog notifying the user
that things might crash or something.. Donno. Its nice to have things
work automatically too.
I'm CC'ing the iiwusynth list, so someone will get around to fixing it
soon. Cheers.
Josh Green
>
> --- iiwusynth-0.2.4/src/iiwu_alsa.c~ 2003-02-27 04:04:32.000000000 -0800
> +++ iiwusynth-0.2.4/src/iiwu_alsa.c 2003-03-07 15:30:07.000000000 -0800
> @@ -511,6 +511,7 @@
> delete_iiwu_alsa_audio_driver(iiwu_audio_driver_t* p)
> {
> iiwu_alsa_audio_driver_t* dev = (iiwu_alsa_audio_driver_t*) p;
> + snd_pcm_state_t state;
>
> if (dev == NULL) {
> return IIWU_OK;
> @@ -526,7 +527,10 @@
> }
>
> if (dev->handle) {
> - snd_pcm_drop(dev->handle);
> + state = snd_pcm_state(dev->handle);
> + if (state != SND_PCM_STATE_OPEN) {
> + snd_pcm_drop(dev->handle);
> + }
> }
>
> if (dev->buffer != NULL) {
- [iiwusynth-devel] Re: [PlanetCCRMA] Re: building swami for 0.2.4-iiwusynth,
Josh Green <=