如何使用的PulseAudio从音频输出重定向到麦克风输入? [英] How to redirect from Audio Output to Mic Input using PulseAudio?

查看:2204
本文介绍了如何使用的PulseAudio从音频输出重定向到麦克风输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我工作的Maemo操作/ MeeGo的和Maemo移动应用使用的PulseAudio。我想打一个MP3给调用者(并取消麦克风这样做的时候,并没有听来电者,一切都应该在后台完成),要做到这一点,我有音频输出从某个重定向(如果没有可能,所有)应用程序,伪造它作为一个输入,使手机的应用程序使用它。

I'm working on a mobile app for Maemo/MeeGo and Maemo uses PulseAudio. I want to play a mp3 to caller (and cancel the mic when doing it, and not to listen caller, everything should be done on background), to do this, I have to redirect Audio Output from a certain (if not possible, all) app, fake it as a Input and make Phone app use it.

在我的Ubuntu PC,我pavucontrol做到了。我创建了一个空水槽,然后:

On my Ubuntu PC, I did it with pavucontrol. I created a NULL sink, then:

Audio Output (from Amarok) --> to NULL Output 
Skype Input <-- NULL Output
Skype Output --> NULL

和它的工作,Amarok的播放的音乐,这是流对Skype的,没有它打我,我没有听说过的所有过程什么。问题是;
一个)的Maemo没有pavucontrol。
二)即使它没有(或者,如果我打包),这不会是什么好,因为这是一个只有-GUI应用程序,我需要做的这一切东西的背景,没有任何用户输入。 (意思是:CLI或API)

And It worked, Amarok played the music and It was streaming to Skype, without playing it to me and I didn't hear anything about all process. Problem is; a) Maemo does not have pavucontrol. b) Even If it did (or if I package it) It wouldn't be any good since It's a only-GUI app and I have to do all of this stuff on background, without any user input. (mean: CLI or API)

在被问及这个Freenode上#pulseaudio和乐于助人的人说:这可以pretty多少可以通过PACTL或pacmd做的,你想要的命令是移动汇输入和移动源输出,但是你需要要知道设备和流索引。所以它看起来像pavucontrol仅仅是一个图形用户界面,PACTL和pacmd都是实打实的,最重要的是,他们是CLI应用程序。

Asked about this on Freenode #pulseaudio and a helpful guy said "It can pretty much be done via pactl or pacmd, the commands you want are move-sink-input and move-source-output, but you need to know device and stream indexes." So It looks like pavucontrol is just a GUI, pactl and pacmd are the real deal, and most importantly, they're CLI apps.

我真的很感谢他,但我不知道PACTL,pacmd什么,移动 - 汇输入或设备/流指标,所以我需要一个非常简单的手册页,或类似的应用程序的来源,一个班轮命令(二?命令的整个页面?只要给我他们!^^)或具有足够的耐心,这个东西给我解释一下。

I'm really thankful to him but I don't know anything about "pactl", "pacmd", "move-sink-input" or "device/stream indexes" so I need a very simplified manual page, or a source of similar app, a one-liner command (two? whole page of commands?, just give me them! ^^) or someone with enough patience to explain this stuff to me.

推荐答案

一个谷歌搜索PACTL或pacmd发现一堆有用的结果。
这里是PACTL其中也有一个链接到pacmd靠近页面末尾的手册页:
PACTL手册页

A Google search of "pactl or pacmd" found a bunch of useful results. Here is a man page for pactl which also has a link to pacmd near the end of the page: pactl manpage

下面是从搜索其他链接,可能对你有用:

Here is another link from that search that might be useful to you:

上的PulseAudio codeblog

我希望这可以帮助你。

这篇关于如何使用的PulseAudio从音频输出重定向到麦克风输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆