<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">OK so I figured out the error of my ways, but I have to say this list is pretty unresponsive in helping the community so I have to ask myself "is pulse is a sensible choice for audio development today"? Particularly since there is little in the way of useful setup documentation for actually using the library on a programatic way, the error messages from the library and utilities are not particularly helpful and so on. <div><br></div><div>What I need to be able to do is route audio around. I suspect write a module for pulse that will look at the alsa stream class and based on that use the input index to set the sick for that stream. It would be nice to have a feature whereby I can rout all output sent to a particular sink, to another sink. I guess what I'd like to do is be able to create virtual devices whose output can be changed on the fly. So for example I could define an mp3 output that I can switch between headphone output and speaker output depending on a system setting. Or between one speaker output and another. If pulse has a means to do this already I'd appreciate someone pointing me in the direction that can help.</div><div><br></div><div>It seems ALSA will do most of this and the ALSA list seems to be a lot more active, so maybe I was mistaken in thinking that Pulse would really be a useful addition to our audio stack, particularly since on an embedded system it consume disproportionate resources for the benefit it provides.</div><div><br></div><div>Also where is the mixer implemented and how is it controlled. Or is the mixer just a dumb "you have 3 streams coming in and I will make them one" type deal. In other words is there bussing or output switching in the mixer. If not, is this planned?<br><div><br></div><div>Anyway, in case this helps anyone else, the sources that are listed by list-sources are not really sources to pulse. So trying to move them around will not work. Here's something I wrote up on the subject:</div><div><br></div><div><span class="Apple-style-span" style="font-size: 13px; line-height: 17px; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">To see the output devices we have created use the list-sinks command </p><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> <br class="webkit-block-placeholder"></div><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><div class="panel" style="line-height: 1.22em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(60, 120, 181); border-right-color: rgb(60, 120, 181); border-bottom-color: rgb(60, 120, 181); border-left-color: rgb(60, 120, 181); color: black; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; background-color: rgb(240, 240, 240); "><div class="panelContent" style="line-height: 1.22em; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 12px; padding-bottom: 0px; padding-left: 12px; background-color: rgb(240, 240, 240); text-align: left; font-size: 10pt; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; ">>>> list-sinks<br style="line-height: 1.22em; ">2 sink(s) available.<br style="line-height: 1.22em; "> * index: 0<br style="line-height: 1.22em; "> name: <usbAudio><br style="line-height: 1.22em; "> driver: <modules/module-alsa-sink.c><br style="line-height: 1.22em; "> flags: LATENCY HARDWARE<br style="line-height: 1.22em; "> state: IDLE<br style="line-height: 1.22em; "> volume: <0: 100% 1: 100%><br style="line-height: 1.22em; "> mute: <0><br style="line-height: 1.22em; "> latency: <97959 usec><br style="line-height: 1.22em; "> monitor source: <0><br style="line-height: 1.22em; "> sample spec: <s16le 2ch 44100Hz><br style="line-height: 1.22em; "> channel map: <front-left,front-right><br style="line-height: 1.22em; "> used by: <0><br style="line-height: 1.22em; "> linked by: <0><br style="line-height: 1.22em; "> module: <0><br style="line-height: 1.22em; "> description: <ALSA PCM on usbLexiconAlpha (USB Audio) via DMA><br style="line-height: 1.22em; "> index: 1<br style="line-height: 1.22em; "> name: <hdaAudio><br style="line-height: 1.22em; "> driver: <modules/module-alsa-sink.c><br style="line-height: 1.22em; "> flags: LATENCY HARDWARE<br style="line-height: 1.22em; "> state: IDLE<br style="line-height: 1.22em; "> volume: <0: 100% 1: 100%><br style="line-height: 1.22em; "> mute: <0><br style="line-height: 1.22em; "> latency: <75827 usec><br style="line-height: 1.22em; "> monitor source: <1><br style="line-height: 1.22em; "> sample spec: <s16le 2ch 44100Hz><br style="line-height: 1.22em; "> channel map: <front-left,front-right><br style="line-height: 1.22em; "> used by: <0><br style="line-height: 1.22em; "> linked by: <0><br style="line-height: 1.22em; "> module: <1><br style="line-height: 1.22em; "> description: <ALSA PCM on intelHDA (ALC883 Analog) via DMA></p></div></div><br clear="all" style="line-height: 1.22em; "><br clear="all" style="line-height: 1.22em; "><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Currently no sound is playing, so if you look to see the sink inputs, you'll see that none have currently been created:</p><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> <br class="webkit-block-placeholder"></div><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><div class="panel" style="line-height: 1.22em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(60, 120, 181); border-right-color: rgb(60, 120, 181); border-bottom-color: rgb(60, 120, 181); border-left-color: rgb(60, 120, 181); color: black; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; background-color: rgb(240, 240, 240); "><div class="panelContent" style="line-height: 1.22em; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 12px; padding-bottom: 0px; padding-left: 12px; background-color: rgb(240, 240, 240); text-align: left; font-size: 10pt; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; ">>>> list-sink-inputs<br style="line-height: 1.22em; ">0 sink input(s) available.</p></div></div><br clear="all" style="line-height: 1.22em; "><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Play a file in a different terminal window (or using your preferred method to make sound). For this experiment I used paplay:<br style="line-height: 1.22em; "> </p><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><div class="panel" style="line-height: 1.22em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(60, 120, 181); border-right-color: rgb(60, 120, 181); border-bottom-color: rgb(60, 120, 181); border-left-color: rgb(60, 120, 181); color: black; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; background-color: rgb(240, 240, 240); "><div class="panelContent" style="line-height: 1.22em; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 12px; padding-bottom: 0px; padding-left: 12px; background-color: rgb(240, 240, 240); text-align: left; font-size: 10pt; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; ">nick@nick-desktop:~$ paplay -v Sony\ CD-ROM\ Test\ Disk\ Type\ 3.0/14\ Cantibile\ Op.\ 17.wav<br style="line-height: 1.22em; ">Using sample spec 's16le 2ch 44100Hz'<br style="line-height: 1.22em; ">Connection established.<br style="line-height: 1.22em; ">Stream successfully created</p></div></div><br clear="all" style="line-height: 1.22em; "><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">I used the -v option to get verbose output from the command, which has no bearing on this experiment.</p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Now if you look at the sink inputs you can see that one has been created for the stream we are currently rendering.</p><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> <br class="webkit-block-placeholder"></div><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><div class="panel" style="line-height: 1.22em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(60, 120, 181); border-right-color: rgb(60, 120, 181); border-bottom-color: rgb(60, 120, 181); border-left-color: rgb(60, 120, 181); color: black; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; background-color: rgb(240, 240, 240); "><div class="panelContent" style="line-height: 1.22em; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 12px; padding-bottom: 0px; padding-left: 12px; background-color: rgb(240, 240, 240); text-align: left; font-size: 10pt; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; ">>>> list-sink-inputs<br style="line-height: 1.22em; ">1 sink input(s) available.<br style="line-height: 1.22em; "> index: 9<br style="line-height: 1.22em; "> name: <Sony CD-ROM Test Disk Type 3.0/14 Cantibile Op. 17.wav><br style="line-height: 1.22em; "> driver: <pulsecore/protocol-native.c><br style="line-height: 1.22em; "> flags:<br style="line-height: 1.22em; "> state: RUNNING<br style="line-height: 1.22em; "> sink: <0> 'usbAudio'<br style="line-height: 1.22em; "> volume: <0: 100% 1: 100%><br style="line-height: 1.22em; "> mute: <0><br style="line-height: 1.22em; "> latency: <500000 usec><br style="line-height: 1.22em; "> sample spec: <s16le 2ch 44100Hz><br style="line-height: 1.22em; "> channel map: <front-left,front-right><br style="line-height: 1.22em; "> resample method: auto<br style="line-height: 1.22em; "> module: <3><br style="line-height: 1.22em; "> client: <7> 'paplay'</p></div></div><br clear="all" style="line-height: 1.22em; "><br clear="all" style="line-height: 1.22em; "><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">By inspection it can be seen that this stream is being rendered on the "usbAudio" device. To switch this stream to the built-in audio source is a straightforward operation, use the move-sync-input command in pacmd. We can see from the output above that the stream index is 9 (note that the index is incremented for each time a new stream is created, so it has to be determined for each stream).</p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> <br style="line-height: 1.22em; "></p><div class="panel" style="line-height: 1.22em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(60, 120, 181); border-right-color: rgb(60, 120, 181); border-bottom-color: rgb(60, 120, 181); border-left-color: rgb(60, 120, 181); color: black; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; background-color: rgb(240, 240, 240); "><div class="panelContent" style="line-height: 1.22em; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 12px; padding-bottom: 0px; padding-left: 12px; background-color: rgb(240, 240, 240); text-align: left; font-size: 10pt; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; ">>>> move-sink-input 9 hdaAudio</p></div></div><br clear="all" style="line-height: 1.22em; "><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Now if the sink inputs are listed again you can see the output sink has changed, verifying this by listening, the output does indeed get switched.</p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> <br style="line-height: 1.22em; "></p><div class="panel" style="line-height: 1.22em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(60, 120, 181); border-right-color: rgb(60, 120, 181); border-bottom-color: rgb(60, 120, 181); border-left-color: rgb(60, 120, 181); color: black; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; background-color: rgb(240, 240, 240); "><div class="panelContent" style="line-height: 1.22em; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 12px; padding-bottom: 0px; padding-left: 12px; background-color: rgb(240, 240, 240); text-align: left; font-size: 10pt; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; ">>>> list-sink-inputs<br style="line-height: 1.22em; ">1 sink input(s) available.<br style="line-height: 1.22em; "> index: 9<br style="line-height: 1.22em; "> name: <Sony CD-ROM Test Disk Type 3.0/14 Cantibile Op. 17.wav><br style="line-height: 1.22em; "> driver: <pulsecore/protocol-native.c><br style="line-height: 1.22em; "> flags:<br style="line-height: 1.22em; "> state: RUNNING<br style="line-height: 1.22em; "> sink: <1> 'hdaAudio'<br style="line-height: 1.22em; "> volume: <0: 100% 1: 100%><br style="line-height: 1.22em; "> mute: <0><br style="line-height: 1.22em; "> latency: <500000 usec><br style="line-height: 1.22em; "> sample spec: <s16le 2ch 44100Hz><br style="line-height: 1.22em; "> channel map: <front-left,front-right><br style="line-height: 1.22em; "> resample method: auto<br style="line-height: 1.22em; "> module: <3><br style="line-height: 1.22em; "> client: <7> 'paplay'<br style="line-height: 1.22em; "> </p></div></div><br clear="all" style="line-height: 1.22em; "><br clear="all" style="line-height: 1.22em; "><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br class="webkit-block-placeholder"></div><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">The api routines for this are in the file /pulseaudio-0.9.8/src/pulse/introspect.c</p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; ">Look at these routines:</p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "> <br style="line-height: 1.22em; "></p><div class="panel" style="line-height: 1.22em; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(60, 120, 181); border-right-color: rgb(60, 120, 181); border-bottom-color: rgb(60, 120, 181); border-left-color: rgb(60, 120, 181); color: black; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; margin-top: 10px; margin-right: 20px; margin-bottom: 10px; margin-left: 20px; background-color: rgb(240, 240, 240); "><div class="panelContent" style="line-height: 1.22em; color: rgb(0, 0, 0); margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 12px; padding-bottom: 0px; padding-left: 12px; background-color: rgb(240, 240, 240); text-align: left; font-size: 10pt; "><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; "><b style="line-height: 1.22em; ">int pa_stream_connect_playback (pa_stream *s,const char *dev, const pa_buffer_attr *attr, pa_stream_flags_t flags, pa_cvolume *volume, pa_stream *sync_stream)</b></p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; "><em style="line-height: 1.22em; "> Connect the stream to a sink.</em></p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; "><b style="line-height: 1.22em; ">int pa_stream_connect_record (pa_stream *s, const char *dev, const pa_buffer_attr *attr, pa_stream_flags_t flags)</b></p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; "><em style="line-height: 1.22em; "> Connect the stream to a source.</em><br clear="all" style="line-height: 1.22em; "><b style="line-height: 1.22em; ">int pa_stream_disconnect (pa_stream *s)</b></p><p style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; text-align: left; font-size: 10pt; "><em style="line-height: 1.22em; "> Disconnect a stream from a source/sink.</em><br style="line-height: 1.22em; "> <br style="line-height: 1.22em; "> </p></div></div><br clear="all" style="line-height: 1.22em; "><div style="font-family: Helvetica, Arial, sans-serif; color: rgb(0, 0, 0); font-weight: normal; font-size: 10pt; line-height: 13pt; margin-top: 10px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; "><br></div></span></div><div><br></div><div><div><div>On May 1, 2008, at 11:14 AM, Nick Thompson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi there,<div><br></div><div>I have a system where I need to move sources to different sinks according to a policy. I thought I'd try this out using pacmd before I start trying to code this up with pulse, put pacmd does not behave as expected (by me :).<div><br></div><div>I tried the following command in pacmd:</div><div><br></div><div><span class="Apple-style-span" style="font-family: Verdana; ">>>> move-sink-input 0 hdaAudio.monitor<br>No sink input found with this index.<br></span></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">When I list the sinks and sources I get the output listed below.</font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">Is anyone familiar with pacmd. According to the help, this looks as if it should work.</font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">Eventually I want to publish several virtual devices, route them to a mixer (possibly via an SRC) and route the mixer output to a specific ALSA sink. I need two instances of mixers so that I can mix some streams to one output device and some streams to another. I need to be able to dynamically rout the entire output to another ALSA sink depending on the policy set. I'd also like to rout sources to the different mixer instances as required. If I can do routing within a single mixer instance, so much the better. Is Pulse capable of this or do I need to find another route to implement this.</font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">Thanks for any advice,</font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">Nick</font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><font class="Apple-style-span" face="Verdana">here is the output of list for sources and sinks:</font></div><div><font class="Apple-style-span" face="Verdana"><br></font></div><div><!--StartFragment--><font face="Verdana, Helvetica, Arial"><span style="font-size:12.0px">>>> list-sources<br> 3 source(s) available.<br> index: 0<br> name: <usbAudio.monitor><br> driver: <modules/module-alsa-sink.c><br> flags:<br> state: IDLE<br> volume: <0: 100% 1: 100%><br> mute: <0><br> latency: <0 usec><br> sample spec: <s16le 2ch 44100Hz><br> channel map: <front-left,front-right><br> used by: <0><br> linked by: <0><br> monitor_of: <0><br> module: <0><br> description: <Monitor Source of ALSA PCM on usbLexiconAlpha (USB Audio) via DMA><br> index: 1<br> name: <hdaAudio.monitor><br> driver: <modules/module-alsa-sink.c><br> flags:<br> state: IDLE<br> volume: <0: 100% 1: 100%><br> mute: <0><br> latency: <0 usec><br> sample spec: <s16le 2ch 44100Hz><br> channel map: <front-left,front-right><br> used by: <0><br> linked by: <0><br> monitor_of: <1><br> module: <1><br> description: <Monitor Source of ALSA PCM on intelHDA (ALC883 Analog) via DMA><br> * index: 2<br> name: <alsa_input.hw_0><br> driver: <modules/module-alsa-source.c><br> flags: HW_VOLUME_CTRL LATENCY HARDWARE<br> state: IDLE<br> volume: <0: 0% 1: 0%><br> mute: <0><br> latency: <23219 usec><br> sample spec: <s16le 2ch 44100Hz><br> channel map: <front-left,front-right><br> used by: <0><br> linked by: <0><br> module: <2><br> description: <ALSA PCM on hw:0 (ALC883 Analog) via DMA><br>>>><br> <br> </span></font> <!--EndFragment--> </div></div></div>_______________________________________________<br>pulseaudio-discuss mailing list<br><a href="mailto:pulseaudio-discuss@mail.0pointer.de">pulseaudio-discuss@mail.0pointer.de</a><br>https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss<br></blockquote></div><br></div></div></body></html>