27 #ifndef ASYNC_AUDIO_RECORDER_INCLUDED
28 #define ASYNC_AUDIO_RECORDER_INCLUDED
39 #include <sigc++/sigc++.h>
131 int sample_rate=INTERNAL_SAMPLE_RATE);
166 virtual int writeSamples(
const float *samples,
int count);
180 std::string filename;
182 unsigned samples_written;
185 unsigned max_samples;
189 void writeWaveHeader(
void);
190 int store32bitValue(
char *ptr, uint32_t val);
191 int store16bitValue(
char *ptr, uint16_t val);
AudioRecorder(const std::string &filename, AudioRecorder::Format fmt=FMT_AUTO, int sample_rate=INTERNAL_SAMPLE_RATE)
Default constuctor.
~AudioRecorder(void)
Destructor.
bool initialize(void)
Initialize the recorder.
virtual void flushSamples(void)
Tell the sink to flush the previously written samples.
void setMaxRecordingTime(unsigned time_ms)
Set the maximum length of this recording.
This file contains the base class for an audio sink.
virtual int writeSamples(const float *samples, int count)
Write samples into this audio sink.
The base class for an audio sink.
A class for recording raw audio to a file.