libsdr
0.1.0
A simple SDR library
|
Stores the received buffers into a WAV file. More...
#include <wavfile.hh>
Public Member Functions | |
WavSink (const std::string &filename) | |
Constructor, filename specifies the file name, the WAV data is stored into. More... | |
virtual | ~WavSink () |
Destructor, closes the file if not done yet. More... | |
virtual void | config (const Config &src_cfg) |
Configures the sink. More... | |
void | close () |
Completes the WAV header and closes the file. More... | |
virtual void | process (const Buffer< Scalar > &buffer, bool allow_overwrite) |
Writes some data into the WAV file. More... | |
Public Member Functions inherited from sdr::Sink< Scalar > | |
Sink () | |
Constructor. More... | |
virtual | ~Sink () |
Drestructor. More... | |
virtual void | handleBuffer (const RawBuffer &buffer, bool allow_overwrite) |
Re-implemented from SinkBase . More... | |
Public Member Functions inherited from sdr::SinkBase | |
SinkBase () | |
Constructor. More... | |
virtual | ~SinkBase () |
Destructor. More... | |
Protected Attributes | |
std::fstream | _file |
The file output stream. More... | |
uint16_t | _bitsPerSample |
The number of bits per sample (depends on the template type). More... | |
uint32_t | _frameCount |
The total number of frame counts. More... | |
uint32_t | _sampleRate |
The sample rate. More... | |
uint16_t | _numChanels |
The number of chanels. More... | |
Stores the received buffers into a WAV file.
|
inline |
Constructor, filename
specifies the file name, the WAV data is stored into.
ConfigError | If the specified file can not be opened for output. |
|
inlinevirtual |
Destructor, closes the file if not done yet.
|
inline |
Completes the WAV header and closes the file.
|
inlinevirtual |
Configures the sink.
Implements sdr::SinkBase.
|
inlinevirtual |
Writes some data into the WAV file.
Implements sdr::Sink< Scalar >.
|
protected |
The number of bits per sample (depends on the template type).
|
protected |
The file output stream.
|
protected |
The total number of frame counts.
|
protected |
The number of chanels.
|
protected |
The sample rate.