Hallo, Andy Farnell hat gesagt: // Andy Farnell wrote:
An interesting question on the forum has me scratching my head here, perhaps someone knows this?
"What's the best method to access to soundcard info and number of channels from a PD patch? I try to explain... I'm comunicating PD patch with Flash using OSC. How can I retry soundcard type, info, and number of channels from the PD patch and send to Flash app? Thanks a lot in advance."
So, is there a message that can be used to query the state of the audio engine and return stuff like sample rate, channels?
samplerate~ of course is easy, but for the other things I don't know an elegant solution. This is especially hard as Pd uses so many different ways to access a sound device: Portaudio, ALSA, OSS, JACK, ASIO, Coraudio, maybe more?
You could try to eavesdrop on the [r pd] receiver, watch for audio-related messages:
print: audio-setapi 1 print: audio-dialog 0 0 0 0 2 0 0 0 0 0 0 0 2 0 0 0 44100 50 print: audio-setapi 2 print: audio-dialog 0 0 0 0 2 0 0 0 0 0 0 0 2 0 0 0 44100 50
but that only works for changes to a running patch.
Frank Barknecht _ ______footils.org__