GNU Radio 3.6.5 C++ API

gr::blocks::wavfile_sink Class Reference

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

#include <wavfile_sink.h>

Inheritance diagram for gr::blocks::wavfile_sink:
gr_sync_block gr_block gr_basic_block gr_msg_accepter gruel::msg_accepter gr::blocks::wavfile_sink_impl

List of all members.

Public Types

typedef boost::shared_ptr
< wavfile_sink
sptr

Public Member Functions

virtual bool open (const char *filename)=0
 Opens a new file and writes a WAV header. Thread-safe.
virtual void close ()=0
 Closes the currently active file and completes the WAV header. Thread-safe.
virtual void set_sample_rate (unsigned int sample_rate)=0
 Set the sample rate. This will not affect the WAV file currently opened. Any following open() calls will use this new sample rate.
virtual void set_bits_per_sample (int bits_per_sample)=0
 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.

Static Public Member Functions

static sptr make (const char *filename, int n_channels, unsigned int sample_rate, int bits_per_sample=16)

Detailed Description

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

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


Member Typedef Documentation


Member Function Documentation

virtual void gr::blocks::wavfile_sink::close ( ) [pure virtual]

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

Implemented in gr::blocks::wavfile_sink_impl.

static sptr gr::blocks::wavfile_sink::make ( const char *  filename,
int  n_channels,
unsigned int  sample_rate,
int  bits_per_sample = 16 
) [static]
virtual bool gr::blocks::wavfile_sink::open ( const char *  filename) [pure virtual]

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

Implemented in gr::blocks::wavfile_sink_impl.

virtual void gr::blocks::wavfile_sink::set_bits_per_sample ( int  bits_per_sample) [pure virtual]

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.

Implemented in gr::blocks::wavfile_sink_impl.

virtual void gr::blocks::wavfile_sink::set_sample_rate ( unsigned int  sample_rate) [pure virtual]

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

Implemented in gr::blocks::wavfile_sink_impl.


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