How to make Alsa Loopback device to work in Puredata
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!
audio alsa
migrated from raspberrypi.stackexchange.com Apr 23 '15 at 16:24
This question came from our site for users and developers of hardware and software for Raspberry Pi.
add a comment |
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!
audio alsa
migrated from raspberrypi.stackexchange.com Apr 23 '15 at 16:24
This question came from our site for users and developers of hardware and software for Raspberry Pi.
add a comment |
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!
audio alsa
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!
audio alsa
audio alsa
asked Apr 23 '15 at 16:20
CorentoulfCorentoulf
212
212
migrated from raspberrypi.stackexchange.com Apr 23 '15 at 16:24
This question came from our site for users and developers of hardware and software for Raspberry Pi.
migrated from raspberrypi.stackexchange.com Apr 23 '15 at 16:24
This question came from our site for users and developers of hardware and software for Raspberry Pi.
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
Just FYI, Shairport Sync can now give you the audio feed directly without the need of an ALSA loopback device. You can compile it to output the audio to a pipe or to stdout.
Thanks for this information. I'm looking at your new version of shairport-sync (2.6). (I really appreciate the metadata) Indeed I can route the signal to a pipe but I don't understand the way this works... It's kind of dusk to me ! I read the man, saying that to output to a pipe I need to specify a path for it. OK, but how can I get the audio then in another software ? Is it a special path needed or can I create one path in /home/pi or /tmp ? Thanks for your feedback !
– Corentoulf
Oct 31 '15 at 12:12
Okay, I think I understood the pipe concept. I got it working when looking for the audio from aplay using : aplay -f cd /tmp/shairport-pipe. Not sure this is possible in pure data though. I'll look for this! Thanks
– Corentoulf
Oct 31 '15 at 14:27
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "106"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f198194%2fhow-to-make-alsa-loopback-device-to-work-in-puredata%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Just FYI, Shairport Sync can now give you the audio feed directly without the need of an ALSA loopback device. You can compile it to output the audio to a pipe or to stdout.
Thanks for this information. I'm looking at your new version of shairport-sync (2.6). (I really appreciate the metadata) Indeed I can route the signal to a pipe but I don't understand the way this works... It's kind of dusk to me ! I read the man, saying that to output to a pipe I need to specify a path for it. OK, but how can I get the audio then in another software ? Is it a special path needed or can I create one path in /home/pi or /tmp ? Thanks for your feedback !
– Corentoulf
Oct 31 '15 at 12:12
Okay, I think I understood the pipe concept. I got it working when looking for the audio from aplay using : aplay -f cd /tmp/shairport-pipe. Not sure this is possible in pure data though. I'll look for this! Thanks
– Corentoulf
Oct 31 '15 at 14:27
add a comment |
Just FYI, Shairport Sync can now give you the audio feed directly without the need of an ALSA loopback device. You can compile it to output the audio to a pipe or to stdout.
Thanks for this information. I'm looking at your new version of shairport-sync (2.6). (I really appreciate the metadata) Indeed I can route the signal to a pipe but I don't understand the way this works... It's kind of dusk to me ! I read the man, saying that to output to a pipe I need to specify a path for it. OK, but how can I get the audio then in another software ? Is it a special path needed or can I create one path in /home/pi or /tmp ? Thanks for your feedback !
– Corentoulf
Oct 31 '15 at 12:12
Okay, I think I understood the pipe concept. I got it working when looking for the audio from aplay using : aplay -f cd /tmp/shairport-pipe. Not sure this is possible in pure data though. I'll look for this! Thanks
– Corentoulf
Oct 31 '15 at 14:27
add a comment |
Just FYI, Shairport Sync can now give you the audio feed directly without the need of an ALSA loopback device. You can compile it to output the audio to a pipe or to stdout.
Just FYI, Shairport Sync can now give you the audio feed directly without the need of an ALSA loopback device. You can compile it to output the audio to a pipe or to stdout.
answered Oct 17 '15 at 12:02
Mike BradyMike Brady
1
1
Thanks for this information. I'm looking at your new version of shairport-sync (2.6). (I really appreciate the metadata) Indeed I can route the signal to a pipe but I don't understand the way this works... It's kind of dusk to me ! I read the man, saying that to output to a pipe I need to specify a path for it. OK, but how can I get the audio then in another software ? Is it a special path needed or can I create one path in /home/pi or /tmp ? Thanks for your feedback !
– Corentoulf
Oct 31 '15 at 12:12
Okay, I think I understood the pipe concept. I got it working when looking for the audio from aplay using : aplay -f cd /tmp/shairport-pipe. Not sure this is possible in pure data though. I'll look for this! Thanks
– Corentoulf
Oct 31 '15 at 14:27
add a comment |
Thanks for this information. I'm looking at your new version of shairport-sync (2.6). (I really appreciate the metadata) Indeed I can route the signal to a pipe but I don't understand the way this works... It's kind of dusk to me ! I read the man, saying that to output to a pipe I need to specify a path for it. OK, but how can I get the audio then in another software ? Is it a special path needed or can I create one path in /home/pi or /tmp ? Thanks for your feedback !
– Corentoulf
Oct 31 '15 at 12:12
Okay, I think I understood the pipe concept. I got it working when looking for the audio from aplay using : aplay -f cd /tmp/shairport-pipe. Not sure this is possible in pure data though. I'll look for this! Thanks
– Corentoulf
Oct 31 '15 at 14:27
Thanks for this information. I'm looking at your new version of shairport-sync (2.6). (I really appreciate the metadata) Indeed I can route the signal to a pipe but I don't understand the way this works... It's kind of dusk to me ! I read the man, saying that to output to a pipe I need to specify a path for it. OK, but how can I get the audio then in another software ? Is it a special path needed or can I create one path in /home/pi or /tmp ? Thanks for your feedback !
– Corentoulf
Oct 31 '15 at 12:12
Thanks for this information. I'm looking at your new version of shairport-sync (2.6). (I really appreciate the metadata) Indeed I can route the signal to a pipe but I don't understand the way this works... It's kind of dusk to me ! I read the man, saying that to output to a pipe I need to specify a path for it. OK, but how can I get the audio then in another software ? Is it a special path needed or can I create one path in /home/pi or /tmp ? Thanks for your feedback !
– Corentoulf
Oct 31 '15 at 12:12
Okay, I think I understood the pipe concept. I got it working when looking for the audio from aplay using : aplay -f cd /tmp/shairport-pipe. Not sure this is possible in pure data though. I'll look for this! Thanks
– Corentoulf
Oct 31 '15 at 14:27
Okay, I think I understood the pipe concept. I got it working when looking for the audio from aplay using : aplay -f cd /tmp/shairport-pipe. Not sure this is possible in pure data though. I'll look for this! Thanks
– Corentoulf
Oct 31 '15 at 14:27
add a comment |
Thanks for contributing an answer to Unix & Linux Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f198194%2fhow-to-make-alsa-loopback-device-to-work-in-puredata%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown