QcAudioSinkHost Class
The audio sink and the device it pulls from, living on the audio thread of QcSystemAudio: Qt's sinks pull (and refill their buffers) on the thread that owns them, so a stalled GUI thread (a screen opening for the first time) would otherwise let the sound drop out. More...
| Header: | #include <audio/QcAudioSinkHost.h> |
| Inherits: | QObject |
Public Functions
| QcAudioSinkHost() | |
| QcAudioSinkHost(const QcAudioSinkHost &) | |
| QcAudioSinkHost(QcAudioSinkHost &&) | |
| void | close() |
| QcAudioPlatform::Opened | open(const QAudioDevice &device, const QAudioFormat &format, QcMixerDevice::Format sampleFormat, const QcMixerDevice::Render &render, int bufferMilliseconds) |
| QcAudioSinkHost & | operator=(QcAudioSinkHost &&) |
| QcAudioSinkHost & | operator=(const QcAudioSinkHost &) |
Signals
| void | failed(quint64 generation, int error) |
Detailed Description
QcSystemAudio calls open() and close() on that thread and waits for them.
Member Function Documentation
QcAudioSinkHost::QcAudioSinkHost()
A host without a sink; QcSystemAudio moves it to its audio thread.
[delete] QcAudioSinkHost::QcAudioSinkHost(const QcAudioSinkHost &)
Copy-constructs an instance of QcAudioSinkHost. This function is deleted.
[delete] QcAudioSinkHost::QcAudioSinkHost(QcAudioSinkHost &&)
Move-constructs an instance of QcAudioSinkHost. This function is deleted.
void QcAudioSinkHost::close()
Stops the sink, if one plays. Call on the host's thread.
[signal] void QcAudioSinkHost::failed(quint64 generation, int error)
The sink of generation stopped with error while playing and is closed.
QcAudioPlatform::Opened QcAudioSinkHost::open(const QAudioDevice &device, const QAudioFormat &format, QcMixerDevice::Format sampleFormat, const QcMixerDevice::Render &render, int bufferMilliseconds)
Starts a sink on device in format that pulls render with samples of sampleFormat and keeps bufferMilliseconds of audio buffered, and returns what was opened; on an error nothing stays open. Call on the host's thread.
[delete] QcAudioSinkHost &QcAudioSinkHost::operator=(QcAudioSinkHost &&)
Move-assigns other to this QcAudioSinkHost instance. This function is deleted.
[delete] QcAudioSinkHost &QcAudioSinkHost::operator=(const QcAudioSinkHost &)
Copy-assigns other to this QcAudioSinkHost instance. This function is deleted.