kwave
18.07.70
|
#include <RecordController.h>
Public Slots | |
void | setInitialized (bool initialized) |
void | setEmpty (bool empty) |
void | enablePrerecording (bool enable) |
void | actionReset () |
void | actionStop () |
void | actionPause () |
void | actionStart () |
void | deviceRecordStarted () |
void | deviceBufferFull () |
void | deviceTriggerReached () |
void | deviceRecordStopped (int) |
void | enableTrigger (bool enable) |
Signals | |
void | stateChanged (Kwave::RecordState state) |
void | sigReset (bool &accepted) |
void | sigStartRecord () |
void | sigStopRecord (int errorcode) |
Public Member Functions | |
RecordController () | |
virtual | ~RecordController () |
const char * | stateName (const Kwave::RecordState state) |
Private Attributes | |
Kwave::RecordState | m_state |
Kwave::RecordState | m_next_state |
bool | m_trigger_set |
bool | m_enable_prerecording |
bool | m_empty |
Definition at line 29 of file RecordController.h.
Kwave::RecordController::RecordController | ( | ) |
Constructor
Definition at line 24 of file RecordController.cpp.
|
virtual |
|
slot |
Pause the recording
Definition at line 115 of file RecordController.cpp.
References m_state, Kwave::REC_BUFFERING, Kwave::REC_DONE, Kwave::REC_EMPTY, Kwave::REC_PAUSED, Kwave::REC_PRERECORDING, Kwave::REC_RECORDING, Kwave::REC_UNINITIALIZED, Kwave::REC_WAITING_FOR_TRIGGER, stateChanged(), and stateName().
|
slot |
Clear all recorded data and prepare for new recording
Definition at line 64 of file RecordController.cpp.
References m_next_state, m_state, Kwave::REC_BUFFERING, Kwave::REC_DONE, Kwave::REC_EMPTY, Kwave::REC_PAUSED, Kwave::REC_PRERECORDING, Kwave::REC_RECORDING, Kwave::REC_UNINITIALIZED, Kwave::REC_WAITING_FOR_TRIGGER, sigReset(), and stateChanged().
|
slot |
Start the recording
Definition at line 142 of file RecordController.cpp.
References m_next_state, m_state, Kwave::REC_BUFFERING, Kwave::REC_DONE, Kwave::REC_EMPTY, Kwave::REC_PAUSED, Kwave::REC_PRERECORDING, Kwave::REC_RECORDING, Kwave::REC_UNINITIALIZED, Kwave::REC_WAITING_FOR_TRIGGER, sigStartRecord(), and stateChanged().
Referenced by Kwave::RecordPlugin::setup().
|
slot |
Stop the recording
Definition at line 91 of file RecordController.cpp.
References m_next_state, m_state, Kwave::REC_BUFFERING, Kwave::REC_DONE, Kwave::REC_EMPTY, Kwave::REC_PAUSED, Kwave::REC_PRERECORDING, Kwave::REC_RECORDING, Kwave::REC_UNINITIALIZED, Kwave::REC_WAITING_FOR_TRIGGER, and sigStopRecord().
Referenced by Kwave::RecordPlugin::processBuffer().
|
slot |
The device buffer contains data
Definition at line 196 of file RecordController.cpp.
References m_enable_prerecording, m_next_state, m_state, m_trigger_set, Kwave::REC_BUFFERING, Kwave::REC_DONE, Kwave::REC_EMPTY, Kwave::REC_PAUSED, Kwave::REC_PRERECORDING, Kwave::REC_RECORDING, Kwave::REC_UNINITIALIZED, Kwave::REC_WAITING_FOR_TRIGGER, stateChanged(), and stateName().
Referenced by Kwave::RecordPlugin::processBuffer().
|
slot |
The device has started recording
Definition at line 172 of file RecordController.cpp.
References m_empty, m_next_state, m_state, Kwave::REC_BUFFERING, Kwave::REC_DONE, Kwave::REC_EMPTY, Kwave::REC_PAUSED, Kwave::REC_PRERECORDING, Kwave::REC_RECORDING, Kwave::REC_UNINITIALIZED, Kwave::REC_WAITING_FOR_TRIGGER, stateChanged(), and stateName().
Referenced by Kwave::RecordPlugin::startRecording().
|
slot |
The device has stopped recording
Definition at line 275 of file RecordController.cpp.
References m_empty, m_next_state, m_state, Kwave::REC_BUFFERING, Kwave::REC_DONE, Kwave::REC_EMPTY, Kwave::REC_PAUSED, Kwave::REC_PRERECORDING, Kwave::REC_RECORDING, Kwave::REC_UNINITIALIZED, Kwave::REC_WAITING_FOR_TRIGGER, stateChanged(), and stateName().
|
slot |
The record trigger has been reached
Definition at line 243 of file RecordController.cpp.
References m_enable_prerecording, m_next_state, m_state, m_trigger_set, Kwave::REC_BUFFERING, Kwave::REC_DONE, Kwave::REC_EMPTY, Kwave::REC_PAUSED, Kwave::REC_PRERECORDING, Kwave::REC_RECORDING, Kwave::REC_UNINITIALIZED, Kwave::REC_WAITING_FOR_TRIGGER, stateChanged(), and stateName().
Referenced by Kwave::RecordPlugin::processBuffer().
|
slot |
Enable the prerecording. Has to be called before any status change to enable/disable the prerecording mode
enable | if true, enable prerecording |
Definition at line 58 of file RecordController.cpp.
References m_enable_prerecording.
Referenced by Kwave::RecordPlugin::setup().
|
slot |
The recording trigger has been enabled/disabled
Definition at line 237 of file RecordController.cpp.
References m_trigger_set.
Referenced by Kwave::RecordPlugin::setup().
|
slot |
Informs the controller whether the signal is empty or not
empty | if true, nothing has been recorded |
Definition at line 52 of file RecordController.cpp.
References m_empty.
Referenced by Kwave::RecordPlugin::flushPrerecordingQueue(), Kwave::RecordPlugin::processBuffer(), and Kwave::RecordPlugin::resetRecording().
|
slot |
Informs the controller whether the recording engine has been successfully been initialized or recording cannot be started.
initialized | if true, recording can be started |
Definition at line 40 of file RecordController.cpp.
References m_empty, m_next_state, m_state, Kwave::REC_DONE, Kwave::REC_EMPTY, Kwave::REC_UNINITIALIZED, and stateChanged().
Referenced by Kwave::RecordPlugin::setDevice().
|
signal |
All recorded data has to be cleared
Referenced by actionReset().
|
signal |
|
signal |
|
signal |
emitted when the state of the recording changed
Referenced by actionPause(), actionReset(), actionStart(), deviceBufferFull(), deviceRecordStarted(), deviceRecordStopped(), deviceTriggerReached(), and setInitialized().
const char * Kwave::RecordController::stateName | ( | const Kwave::RecordState | state | ) |
returns the name of a state
Definition at line 324 of file RecordController.cpp.
References Kwave::REC_BUFFERING, Kwave::REC_DONE, Kwave::REC_EMPTY, Kwave::REC_PAUSED, Kwave::REC_PRERECORDING, Kwave::REC_RECORDING, Kwave::REC_UNINITIALIZED, and Kwave::REC_WAITING_FOR_TRIGGER.
Referenced by actionPause(), deviceBufferFull(), deviceRecordStarted(), deviceRecordStopped(), and deviceTriggerReached().
|
private |
if true the current file is empty
Definition at line 125 of file RecordController.h.
Referenced by deviceRecordStarted(), deviceRecordStopped(), setEmpty(), and setInitialized().
|
private |
use prerecording
Definition at line 122 of file RecordController.h.
Referenced by deviceBufferFull(), deviceTriggerReached(), and enablePrerecording().
|
private |
state of the recording engine after finishing the last action, not needed for all state changes.
Definition at line 116 of file RecordController.h.
Referenced by actionReset(), actionStart(), actionStop(), deviceBufferFull(), deviceRecordStarted(), deviceRecordStopped(), deviceTriggerReached(), and setInitialized().
|
private |
current state of the recording engine
Definition at line 110 of file RecordController.h.
Referenced by actionPause(), actionReset(), actionStart(), actionStop(), deviceBufferFull(), deviceRecordStarted(), deviceRecordStopped(), deviceTriggerReached(), and setInitialized().
|
private |
use a trigger
Definition at line 119 of file RecordController.h.
Referenced by deviceBufferFull(), deviceTriggerReached(), and enableTrigger().