GNU Radio 3.5.3.2 C++ API
Audio Interface

Introduction

This is the gr-audio package. This package includes all of the supported audio interfaces, including:

  • alsa
  • oss
  • jack
  • portaudio
  • osx
  • windows
    from gnuradio import audio

See the Doxygen documentation for details about the blocks available in this package. The relevant blocks are listed in the Audio Interface group.

A quick listing of the details can be found in Python after importing by using:

    help(digital)

Usage

For an audio source, a typical OptionParser option and it's use looks like:

    parser.add_option("-O", "--audio-output", type="string", default="",
                       help="pcm device name.  E.g., hw:0,0 or surround51 or /dev/dsp")
    audio_rate = 32e3
    audio_sink = audio.sink (int (audio_rate), options.audio_output)

Similarly, an audio sink would have a typical OptionParser option and its use would look like:

    parser.add_option("-I", "--audio-input", type="string", default="",
                      help="pcm input device name.  E.g., hw:0,0 or /dev/dsp")
    audio_rate = 32e3
    audio_source = audio.source(int(audio_rate), audio_input)