GNU Radio 3.6.5 C++ API
|
Write stream to a Microsoft PCM (.wav) file. More...
#include <wavfile_sink.h>
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) |
Write stream to a Microsoft PCM (.wav) file.
Values must be floats within [-1;1]. Check gr_make_wavfile_sink() for extra info.
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.