$ 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
Anonymous
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)
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)
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.
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.
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.
Confirmed on Debian/lenny/i386 running Pd-vanilla 0.41.4 and Pd-extended 0.41.4 and 0.42.5.
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.
still fails for me with pd-0.44-3 from Miller's site compiled today
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