gnuradio.blocks: Audio Signals

gnuradio.blocks.wavfile_sink(char const * filename, int n_channels, unsigned int sample_rate, int bits_per_sample=16) → wavfile_sink_sptr

Write stream to a Microsoft PCM (.wav) file.

Values must be floats within [-1;1]. Check gr_make_wavfile_sink() for extra info.

Constructor Specific Documentation:

Parameters:
  • filename
  • n_channels
  • sample_rate
  • bits_per_sample
wavfile_sink_sptr.active_thread_priority(wavfile_sink_sptr self) → int
wavfile_sink_sptr.close(wavfile_sink_sptr self)

Closes the currently active file and completes the WAV header. Thread-safe.

wavfile_sink_sptr.declare_sample_delay(wavfile_sink_sptr self, int which, int delay)

declare_sample_delay(wavfile_sink_sptr self, unsigned int delay)

wavfile_sink_sptr.message_subscribers(wavfile_sink_sptr self, swig_int_ptr which_port) → swig_int_ptr
wavfile_sink_sptr.min_noutput_items(wavfile_sink_sptr self) → int
wavfile_sink_sptr.open(wavfile_sink_sptr self, char const * filename) → bool

Opens a new file and writes a WAV header. Thread-safe.

wavfile_sink_sptr.pc_input_buffers_full_avg(wavfile_sink_sptr self, int which) → float

pc_input_buffers_full_avg(wavfile_sink_sptr self) -> pmt_vector_float

wavfile_sink_sptr.pc_noutput_items_avg(wavfile_sink_sptr self) → float
wavfile_sink_sptr.pc_nproduced_avg(wavfile_sink_sptr self) → float
wavfile_sink_sptr.pc_output_buffers_full_avg(wavfile_sink_sptr self, int which) → float

pc_output_buffers_full_avg(wavfile_sink_sptr self) -> pmt_vector_float

wavfile_sink_sptr.pc_throughput_avg(wavfile_sink_sptr self) → float
wavfile_sink_sptr.pc_work_time_avg(wavfile_sink_sptr self) → float
wavfile_sink_sptr.pc_work_time_total(wavfile_sink_sptr self) → float
wavfile_sink_sptr.sample_delay(wavfile_sink_sptr self, int which) → unsigned int
wavfile_sink_sptr.set_bits_per_sample(wavfile_sink_sptr self, int bits_per_sample)

Set bits per sample. This will not affect the WAV file currently opened (see set_sample_rate()). If the value is neither 8 nor 16, the call is ignored and the current value is kept.

wavfile_sink_sptr.set_min_noutput_items(wavfile_sink_sptr self, int m)
wavfile_sink_sptr.set_sample_rate(wavfile_sink_sptr self, unsigned int sample_rate)

Set the sample rate. This will not affect the WAV file currently opened. Any following open() calls will use this new sample rate.

wavfile_sink_sptr.set_thread_priority(wavfile_sink_sptr self, int priority) → int
wavfile_sink_sptr.thread_priority(wavfile_sink_sptr self) → int
gnuradio.blocks.wavfile_source(char const * filename, bool repeat=False) → wavfile_source_sptr

Read stream from a Microsoft PCM (.wav) file, output floats.

Unless otherwise called, values are within [-1;1]. Check gr_make_wavfile_source() for extra info.

Constructor Specific Documentation:

Parameters:
  • filename
  • repeat
wavfile_source_sptr.active_thread_priority(wavfile_source_sptr self) → int
wavfile_source_sptr.bits_per_sample(wavfile_source_sptr self) → int

Return the number of bits per sample as specified in the wav file header. Only 8 or 16 bit are supported here.

wavfile_source_sptr.channels(wavfile_source_sptr self) → int

Return the number of channels in the wav file as specified in the wav file header. This is also the max number of outputs you can have.

wavfile_source_sptr.declare_sample_delay(wavfile_source_sptr self, int which, int delay)

declare_sample_delay(wavfile_source_sptr self, unsigned int delay)

wavfile_source_sptr.message_subscribers(wavfile_source_sptr self, swig_int_ptr which_port) → swig_int_ptr
wavfile_source_sptr.min_noutput_items(wavfile_source_sptr self) → int
wavfile_source_sptr.pc_input_buffers_full_avg(wavfile_source_sptr self, int which) → float

pc_input_buffers_full_avg(wavfile_source_sptr self) -> pmt_vector_float

wavfile_source_sptr.pc_noutput_items_avg(wavfile_source_sptr self) → float
wavfile_source_sptr.pc_nproduced_avg(wavfile_source_sptr self) → float
wavfile_source_sptr.pc_output_buffers_full_avg(wavfile_source_sptr self, int which) → float

pc_output_buffers_full_avg(wavfile_source_sptr self) -> pmt_vector_float

wavfile_source_sptr.pc_throughput_avg(wavfile_source_sptr self) → float
wavfile_source_sptr.pc_work_time_avg(wavfile_source_sptr self) → float
wavfile_source_sptr.pc_work_time_total(wavfile_source_sptr self) → float
wavfile_source_sptr.sample_delay(wavfile_source_sptr self, int which) → unsigned int
wavfile_source_sptr.sample_rate(wavfile_source_sptr self) → unsigned int

Read the sample rate as specified in the wav file header.

wavfile_source_sptr.set_min_noutput_items(wavfile_source_sptr self, int m)
wavfile_source_sptr.set_thread_priority(wavfile_source_sptr self, int priority) → int
wavfile_source_sptr.thread_priority(wavfile_source_sptr self) → int

Previous topic

gnuradio.blocks: Modulators and Demodulators

Next topic

gnuradio.blocks: Networking Tools

This Page