23 #ifndef INCLUDED_GR_WAVFILE_SOURCE_H
24 #define INCLUDED_GR_WAVFILE_SOURCE_H
55 unsigned d_sample_rate;
57 int d_bytes_per_sample;
58 int d_first_sample_pos;
59 unsigned d_samples_per_chan;
60 unsigned d_sample_idx;
61 int d_normalize_shift;
67 float convert_to_float(
short int sample);
72 int work(
int noutput_items,
73 gr_vector_const_void_star &input_items,
74 gr_vector_void_star &output_items);
Definition: gr_sync_block.h:27
unsigned int sample_rate() const
Read the sample rate as specified in the wav file header.
Definition: gr_wavfile_source.h:79
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 suppor...
Definition: gr_wavfile_source.h:85
shared_ptr documentation stub
Definition: shared_ptr_docstub.h:15
#define GR_CORE_API
Definition: gr_core_api.h:30
Read stream from a Microsoft PCM (.wav) file, output floats.
Definition: gr_wavfile_source.h:45
GR_CORE_API gr_wavfile_source_sptr gr_make_wavfile_source(const char *filename, bool repeat=false)
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.
Definition: gr_wavfile_source.h:92
virtual 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 ...