Friday, April 29, 2011

Re: [Discuss-gnuradio] Audio sink busy / segfaults of WX FFT + WX Waterfall

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 04/29/2011 12:48 PM, Tom Rondeau wrote:
> Shared access when using ALSA is definitely an issue. Your other
> programs are likely using some audio layer on top of ALSA, like
> portaudio. GNU Radio will try to use ALSA straight away, which can cause
> sharing issues. This is a long standing problem, and we've never had
> anybody spend the necessary time to work out a proper solution.

They shouldn't. SuSE comes with pulseaudio but it's buggy, so I
uninstalled it and changed all configs to use Alsa directly.

> I've never seen/heard of those guys segfaulting before. Can you provide
> the settings of the blocks you are using? I've used the FFT and
> Waterfall sinks directly connected to a USRP source (both UHD and the
> legacy interface) with no problems.

sgofferj@enterprise:~> python top_block.py
Segmentation fault
sgofferj@enterprise:~> cat top_block.py
#!/usr/bin/env python
##################################################
# Gnuradio Python Flow Graph
# Title: Top Block
# Generated: Fri Apr 29 12:56:39 2011
##################################################

from gnuradio import audio
from gnuradio import eng_notation
from gnuradio import gr
from gnuradio import window
from gnuradio.eng_option import eng_option
from gnuradio.gr import firdes
from gnuradio.wxgui import fftsink2
from grc_gnuradio import wxgui as grc_wxgui
from optparse import OptionParser
import wx

class top_block(grc_wxgui.top_block_gui):

def __init__(self):
grc_wxgui.top_block_gui.__init__(self, title="Top Block")

##################################################
# Variables
##################################################
self.samp_rate = samp_rate = 44100

##################################################
# Blocks
##################################################
self.wxgui_fftsink2_0 = fftsink2.fft_sink_f(
self.GetWin(),
baseband_freq=0,
y_per_div=10,
y_divs=10,
ref_level=50,
ref_scale=2.0,
sample_rate=samp_rate,
fft_size=1024,
fft_rate=30,
average=False,
avg_alpha=None,
title="FFT Plot",
peak_hold=False,
)
self.Add(self.wxgui_fftsink2_0.win)
self.audio_source_0 = audio.source(samp_rate, "", True)

##################################################
# Connections
##################################################
self.connect((self.audio_source_0, 0),
(self.wxgui_fftsink2_0, 0))

def get_samp_rate(self):
return self.samp_rate

def set_samp_rate(self, samp_rate):
self.samp_rate = samp_rate
self.wxgui_fftsink2_0.set_sample_rate(self.samp_rate)

if __name__ == '__main__':
parser = OptionParser(option_class=eng_option, usage="%prog:
[options]")
(options, args) = parser.parse_args()
tb = top_block()
tb.Run(True)


i remember doing this like 2y ago when I first started experimenting
with gnuradio and then it worked.

- -S


- --
(o_ Stefan Gofferje | SCLT, MCP, CCSA
//\ Reg'd Linux User #247167 | VCP #2263
V_/_ Heckler & Koch - the original point and click interface
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (GNU/Linux)

iEYEARECAAYFAk26jAcACgkQbQKZlCdPOMN4QACgsVfyAucD/hYtio0h2KL3D8Z2
dHIAmgMUc+UPzC5QG0+UUhp7GnxXALed
=CvLW
-----END PGP SIGNATURE-----


_______________________________________________
Discuss-gnuradio mailing list
Discuss-gnuradio@gnu.org
https://lists.gnu.org/mailman/listinfo/discuss-gnuradio

No comments:

Post a Comment