Thanks a lot for you helps. I can capture a single audio now when three radios play at the same time. Is there any bug found after you ran a little test application to check the function pa_stream_set_monitor_stream when recording? If no, I think that I used this function in the wrong way. When will the new version "PulseAudio" be released? I think that new version "PulseAudio" will be more powerful if you fix some bugs. Thank you very much for your helps. Yu-Chin 2010/11/22 Colin Guthrie <gmane at colin.guthr.ie>: > 'Twas brillig, and Tsai Yu-Chin at 20/11/10 15:11 did gyre and gimble: >> I have an idea but I am not sure that my idea is feasible. >> I want to create many monitors and many sinks. >> Assign one sink input per sink which is assigned to a monitor. >> In other word, there is one sink input in one sink and there is one >> sink in one monitor. >> Maybe we can record separate audio using this approach. >> >> But I don't know how to create sink and monitor in C code. >> And how to create virtual device in C code. >> >> Can you give me suggestions? >> And can you teach me how to create sink, monitor and Virtual device in C code. >> I can't find any relative information above on the web. > > Depending on your scenario, you can indeed create virtual sinks, ensure > each stream plays to it's own "private" sink and then record directly > from there. > > Do you really want to hear the audio out of a real sound card? (i.e. is > the recording of the sound the primary goal?) > > If you *do* want to hear the sound, then I suggest either > module-remap-sink or module-combine. Both of these allow you to piggy > back on to a real sink. If you do not want to actually hear the sound, > then module-null-sink is probably what you want. > > You could do something like the following: > > pactl load-module module-null-sink sink_name=radio1 > sink_properties=device.description=Radio1 > pactl load-module module-null-sink sink_name=radio2 > sink_properties=device.description=Radio2 > pactl load-module module-null-sink sink_name=radio3 > sink_properties=device.description=Radio3 > > > These three commands will create three virtual sinks (called Radio1, > Radio2 and Radio3). > > You can then launch your radio player as follows: > > PULSE_SINK=radio1 myradioapp > PULSE_SINK=radio2 myradioapp > PULSE_SINK=radio3 myradioapp > > > Or similar. > > Hope that helps. > > Col > > > > -- > > Colin Guthrie > gmane(at)colin.guthr.ie > http://colin.guthr.ie/ > > Day Job: > ?Tribalogic Limited [http://www.tribalogic.net/] > Open Source: > ?Mageia Contributor [http://www.mageia.org/] > ?PulseAudio Hacker [http://www.pulseaudio.org/] > ?Trac Hacker [http://trac.edgewall.org/] > > _______________________________________________ > pulseaudio-discuss mailing list > pulseaudio-discuss at mail.0pointer.de > https://tango.0pointer.de/mailman/listinfo/pulseaudio-discuss >