Hey, everybody.

I am just starting to try GNUradio and I am facing some difficulties. Maybe someone can comment and suggest a direction to find an answer to my question.

I have GNUradio 3.10.9.2 installed on ArchLinux; in gnuradio-companion I created a simple flowgraph: noise source -> throttle -> audio sink.

My problem is that if I specify as device name my device in audio sink, the start of the flowgraph fails:
--------
File “/home/user/gnuradio/alsa1.py”, line 70, in __init__
 self.audio_sink_0 = audio.sink(48000, 'k15', True)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: audio_alsa_sink
--------

I'll clarify at this point that the name of the ALSA device, k15, is defined in ~/.asoundrc and the device itself is a software audio resampler implemented in the ALSA subsystem, that's how it's defined:

pcm.k15 {
   type rate
      slave {
         pcm default
         rate 48000
      }
   converter “samplerate_linear”
}

This device takes an audio stream, resamples it to 48000 and sends it to the sound controller with a sampling rate of 48000 allowed for it.

This device works great when using different programs, like aplay, with different sample rates and parameters, example:

aplay -D k15 -c 1 -r 10000 -f S32_LE /dev/urandom (sound mono, sample rate 10000, format S32_LE).

But it doesn't work with GNUradio.

Can anyone suggest what could be the reason for the error of working with this sound device ?

Another thing: if I compile the flowgraph into C++ and then into an executable file, the error looks like this:

audio_alsa_sink :error: [k15]: set_periods failed: Invalid argument

Thank you.

Reply via email to