On 2015-12-03 08:32, corentin THIERCELIN wrote: Hi,
I'm using shairport-sync on my Raspberry Pi to get audio from an Airplay source. Now I'd like to do signal processing on it, via a Pd patch, before its output to the speakers. To do so, I tried to use jack with Pd but It's not working smoothly.
"not working smoothly"?? could you be more specific?
In fact It's not working at all, the raspberry crashes. Because when using jack, I need to have shairport, pd and jack running together. And there is another step between shairport and jack : the loopback device. So that makes something like this : Shairport --> alsa loopback --> jack --> Pd --> jack --> alsa audio card. (you'll notice that I'm not able to choose an alsa output device when jack is set as input device in Pd) That may be too much for a Raspberry Pi ?
I also tried to process like this : shairport --> loopback --> Pd --> audio card. Here I have sth inaudible! It sounds like the sample rate of the loopback is 1 Hz...
And like this : shairport --> pipe --> loopback --> Pd --> audio card. Here, as you said, they are not synched, It sounds bad and the alsa command to catch the pipe indicates a lot of audio drops.
So, these two cases are not good choices, for sure.
well, you could write an external that does that.
also, "raw audio" is a *very* unspecific term, and the result might be unsatisfactory if the producer and the consumer of that pipe don't agree.
I wish I could write an external. I'm not comfortable with c code, that's exactly why I'm using Pd :) But I'll give a look at how to do this. Maybe I can get inspired by the alsa 'pipe reading' function ?
The aplay command for listening to the audio pipe (directly to audio card) works perfectly, so, I'm telling myself : why not when reading directly the pipe within Pd ?! I need to test this way, that sounds more direct and more efficient ...
Thanks for all your piece of advices.
Corentoulf