Menu

#393 'pd -alsa -send "; pd dsp 1"' fails with -nogui

v0.44
pending-fixed
puredata (322)
5
2014-08-19
2009-04-01
No

$ pd -alsa -send "; pd dsp 1"
works fine

$ pd -alsa -nogui -send "; pd dsp 1"
snd_pcm_open (output): Device or resource busy

if i send to a custom receiver and delay the message by 100ms it seems to work ok, but still, not perfect

at a guess there's a race condition somewhere, and using the gui slows it down enough to work? just a guess though

tested on GNU/Linux/Debian/Lenny/pure:dyne with pd-0.41
may also affect other sound APIs, but I haven't tested with anything other than ALSA

Discussion

  • IOhannes m zmölnig

    confirmed with Pd-0.42.4 (debian lenny/squeeze; x86)

    however i thought the proper way to specify the send-message was "pd dsp 1" (without the leading semicolon)

     
  • IOhannes m zmölnig

    • milestone: 731270 -->
    • assigned_to: nobody --> millerpuckette
     
  • IOhannes m zmölnig

    oh forgot to say:
    OSS:
    /dev/dsp (writeonly): Device or resource busy
    /dev/dsp (readonly): Device or resource busy

    with jack it seems to work fine (though i often have other problems with jack, so i don't know how reliable this is)

     
  • Nobody/Anonymous

    Confirmed in pd-extended 0.41.4 on Ubuntu Jaunty.

    Cannot open the soundcard when starting pd with "pd -nogui -alsa -audiodev 4 ~/StartupPatch.pd" where "StartupPatch.pd" loadbangs a "pd dsp 1" message:

    snd_pcm_open (input): Device or resource busy
    snd_pcm_open (output): Device or resource busy

    Using jack, "-jack -channels 2" connects ok. I have not not tried oss.

    Doing the same on pd-extended 0.40.3 works fine.

    Well, at least I can just delay the dsp switch for now to make it work.

     
  • danomatika

    danomatika - 2009-06-15

    Again in Ubuntu Jaunty,

    Running the same startup patch which loadbangs "pd dsp 1" in pd-extended 0.40.3 with "-rt" yields the same problem. I suppose in realtime mode, pd runs too fast to avoid the race condition.

     
  • Cesar Mauri-Loba

    Confirmed in pd 0.42-5 under WinXP SP3. These are the error messages:

    Error number -9985 opening portaudio stream
    Error message: Device unavailable

    As a workaround I've added a delay after the loadbang that enables the dsp.

     
  • Hans-Christoph Steiner

    Confirmed on Debian/lenny/i386 running Pd-vanilla 0.41.4 and Pd-extended 0.41.4 and 0.42.5.

     
  • Hans-Christoph Steiner

    This seems to be fixed in the HEAD of master (0.44pre...). Please test and report back if it is still an issue for you.

     
  • Hans-Christoph Steiner

    • milestone: --> v0.44
    • status: open --> pending-fixed
     
  • Anonymous

    Anonymous - 2013-07-26

    still fails for me with pd-0.44-3 from Miller's site compiled today

    $ pd -alsa -nogui -send "pd dsp 1"
    ALSA output error (snd_pcm_open): Device or resource busy
    

    works fine without -nogui

    (On the plus side, 0.44 does fix [loadbang]-[samplerate~]->0 with -nogui, which I couldn't find a specific bug for on this tracker, though lots seem to be related)

    -- Claude

     

Anonymous
Anonymous

Add attachments
Cancel