Sample Header Ad - 728x90

How to make Alsa Loopback device to work in Puredata

6 votes
1 answer
1995 views
I'm trying to route an audio signal from an Airplay source (with Shairport-sync) to Puredata. To do so, I created a Loopback Device in Alsa. Then I set this virtual device as Shairport's output like this (hw:2 is the loopback device) : shairplay-sync -a -Airplay -- -d hw:2 But when I try to set the loopback device as Puredata's input I get the following message : audio I/O stuck... closing audio I wondered if this issue could come from my .asoundrc file ? Here it is : # playback PCM device: using loopback subdevice 0,0 pcm.amix { type dmix ipc_key 219345 slave { pcm "hw:Loopback,0,0" period_size 1024 buffer_size 2048 rate 44100 } } # capture PCM device: using loopback subdevice 0,1 pcm.asnoop { type dsnoop ipc_key 219346 slave.pcm "hw:Loopback,0,1" } # duplex device combining our PCM devices defined above pcm.aduplex { type asym playback.pcm "amix" capture.pcm "asnoop" } # ------------------------------------------------------ # for jack alsa_in and alsa_out: looped-back signal at other ends pcm.ploop { type plug slave.pcm "hw:Loopback,1,1" } pcm.cloop { type dsnoop ipc_key 219348 slave { pcm "hw:Loopback,1,0" period_size 1024 buffer_size 2048 rate 44100 } } # ------------------------------------------------------ # default device pcm.!default { type plug slave.pcm "aduplex" } Should I add things about format or anything else ? FYI, the Loopback device works well when used with jack audio. Pure data too. I'd like not to use Jack because It looks like It uses too much ressources (I was not able to make Jack, Puredata and the loopback device work together, it crashes each time...) Thank you for the help!
Asked by Corentoulf (61 rep)
Apr 23, 2015, 04:20 PM
Last activity: Jul 26, 2025, 11:06 PM