GNU Radio:使用声音输出作为输入源 [英] GNU Radio: Use sound output as input source

查看:48
本文介绍了GNU Radio:使用声音输出作为输入源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

gnuradio-companion 中,我使用音频源块作为下一个块的输入信号.一切正常.唯一的小问题是我从我的麦克风接收信号(这是正常的行为).我更愿意直接播放音频信号,而不必通过我的扬声器、我房间的空气和麦克风.

所有这些都会产生信号损失并增加噪声.

我知道有文件源块,但这对我来说不是一个真正的解决方案.

我也知道我可以将迷你插孔电缆从输出端插入声卡的输入端.这不是一个解决方案,因为它可能会损坏声卡,并且仍然会增加失真.

目前我使用 Ubuntu 和 alsa 作为音频驱动程序.

我知道有像 jaaa 和 xoscope 这样的程序可以做到这一点,所以我认为我的要求并不奇怪.

解决方案

您将需要构建一个监视器"ALSA 设备.

我找到了

编辑:

添加了一个关于此的 GNU Radio wiki 页面.

In gnuradio-companion I'm using the audio source block as my input signal for the next blocks. All works almost fine. The only little problem is that I'm getting the signal from my microphone (this is the normal behavior off course). I would rather like to get the audio signal being played directly without having to go through my speakers, the air from my room and the microphone.

All this generates signal losses and adds noise.

I know there is the file source block but this isn't a real solution for me.

I also know I could just plug a mini-jack cable from the output to the input from my sound-card. this isn't a solution either because it could damage the sound-card, and would still add distortion.

Currently I'm using Ubuntu and alsa as audio driver.

I know there are programs like jaaa and xoscope which are able to do this so I think what I'm asking for isn't that strange.

解决方案

You will need build a "monitor" ALSA device.

I found this ArchLinux wiki page which recommends the following procedure, which should apply to Ubuntu, too, as that also uses PulseAudio:

pactl list|grep monitor

pick the right monitor string, e.g. alsa_output.pci-0000_00_1b.0.analog-stereo.monitor. Then create (if it doesn't exist) and edit .asoundrc in your home directory:

gedit ~/.asoundrc

Add

pcm.pulse_monitor {
  type pulse
  device <device name from above>
}

ctl.pulse_monitor {
  type pulse
  device <device name from above>
}

to that file.

Now, use pulse_monitor as your device string in the Audio source. Works well for me (on Fedora 22):

EDIT:

Added a GNU Radio wiki page about this.

这篇关于GNU Radio:使用声音输出作为输入源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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