iiwusynth-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [iiwusynth-devel] Re: [PlanetCCRMA] Re: building swami for 0.2.4-iiw


From: Peter Hanappe
Subject: Re: [iiwusynth-devel] Re: [PlanetCCRMA] Re: building swami for 0.2.4-iiwusynth
Date: Tue, 11 Mar 2003 11:10:11 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.0) Gecko/20020623 Debian/1.0.0-0.woody.1


Good catch, indeed. I made the changes pretty much as you proposed.

Thanks Fernando!

Peter

Josh Green wrote:
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 mailing list
address@hidden
http://mail.nongnu.org/mailman/listinfo/iiwusynth-devel






reply via email to

[Prev in Thread] Current Thread [Next in Thread]