GNU Radio 3.5.1 C++ API
gr_wavfile_source Class Reference

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

#include <gr_wavfile_source.h>

Inheritance diagram for gr_wavfile_source:

List of all members.

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)

Detailed Description

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 & Destructor Documentation

gr_wavfile_source::~gr_wavfile_source ( )

Member Function Documentation

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.


Friends And Related Function Documentation

GR_CORE_API gr_wavfile_source_sptr gr_make_wavfile_source ( const char *  filename,
bool  repeat 
) [friend]

The documentation for this class was generated from the following file: