GNU Radio 3.6.5 C++ API
|
Read stream from a Microsoft PCM (.wav) file, output floats. More...
#include <gr_wavfile_source.h>
Public Member Functions | |
~gr_wavfile_source () | |
int | work (int noutput_items, gr_vector_const_void_star &input_items, gr_vector_void_star &output_items) |
just like gr_block::general_work, only this arranges to call consume_each for you | |
unsigned int | sample_rate () const |
Read the sample rate as specified in the wav file header. | |
int | bits_per_sample () const |
Return the number of bits per sample as specified in the wav file header. Only 8 or 16 bit are supported here. | |
int | channels () const |
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. | |
Friends | |
GR_CORE_API gr_wavfile_source_sptr | gr_make_wavfile_source (const char *filename, bool repeat) |
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.
gr_wavfile_source::~gr_wavfile_source | ( | ) |
int gr_wavfile_source::bits_per_sample | ( | ) | const [inline] |
Return the number of bits per sample as specified in the wav file header. Only 8 or 16 bit are supported here.
int gr_wavfile_source::channels | ( | ) | const [inline] |
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.
unsigned int gr_wavfile_source::sample_rate | ( | ) | const [inline] |
Read the sample rate as specified in the wav file header.
int gr_wavfile_source::work | ( | int | noutput_items, |
gr_vector_const_void_star & | input_items, | ||
gr_vector_void_star & | output_items | ||
) | [virtual] |
just like gr_block::general_work, only this arranges to call consume_each for you
The user must override work to define the signal processing code
Implements gr_sync_block.
GR_CORE_API gr_wavfile_source_sptr gr_make_wavfile_source | ( | const char * | filename, |
bool | repeat | ||
) | [friend] |