QPlatformAudioSink Class
The QPlatformAudioSink class is a base class for audio backends. More...
Header: | #include <QPlatformAudioSink> |
CMake: | find_package(Qt6 COMPONENTS Multimedia REQUIRED) target_link_libraries(mytarget PRIVATE Qt6::Multimedia) |
qmake: | QT += multimedia |
Inherits: | QAudioStateChangeNotifier |
Public Functions
virtual qsizetype | bufferSize() const = 0 |
virtual qsizetype | bytesFree() const = 0 |
virtual QAudio::Error | error() const = 0 |
virtual QAudioFormat | format() const = 0 |
virtual qint64 | processedUSecs() const = 0 |
virtual void | reset() = 0 |
virtual void | resume() = 0 |
virtual void | setBufferSize(qsizetype value) = 0 |
virtual void | setFormat(const QAudioFormat &fmt) = 0 |
virtual void | setVolume(qreal volume) |
virtual void | start(QIODevice *device) = 0 |
virtual QIODevice * | start() = 0 |
virtual QAudio::State | state() const = 0 |
virtual void | stop() = 0 |
virtual void | suspend() = 0 |
virtual qreal | volume() const |
Detailed Description
QPlatformAudioSink implements audio functionality for QAudioSink, i.e., QAudioSink routes function calls to QPlatformAudioSink. For a description of the functionality that is implemented, see the QAudioSink class and function descriptions.
See also QAudioSink.
Member Function Documentation
[pure virtual]
qsizetype QPlatformAudioSink::bufferSize() const
Returns the audio buffer size in bytes.
See also setBufferSize().
[pure virtual]
qsizetype QPlatformAudioSink::bytesFree() const
Returns the free space available in bytes in the audio buffer.
[pure virtual]
QAudio::Error QPlatformAudioSink::error() const
Returns the error state.
[pure virtual]
QAudioFormat QPlatformAudioSink::format() const
Returns the QAudioFormat being used.
See also setFormat().
[pure virtual]
qint64 QPlatformAudioSink::processedUSecs() const
Returns the amount of audio data processed since start() was called in milliseconds.
[pure virtual]
void QPlatformAudioSink::reset()
Drops all audio data in the buffers, resets buffers to zero.
[pure virtual]
void QPlatformAudioSink::resume()
Resumes processing audio data after a suspend()
[pure virtual]
void QPlatformAudioSink::setBufferSize(qsizetype value)
Sets the audio buffer size to value in bytes.
See also bufferSize().
[pure virtual]
void QPlatformAudioSink::setFormat(const QAudioFormat &fmt)
Set the QAudioFormat to use to fmt. Setting the format is only allowable while in QAudio::StoppedState.
See also format().
[virtual]
void QPlatformAudioSink::setVolume(qreal volume)
Sets the volume. Where volume is between 0.0 and 1.0.
See also volume().
[pure virtual]
void QPlatformAudioSink::start(QIODevice *device)
Uses the device as the QIODevice to transfer data.
[pure virtual]
QIODevice *QPlatformAudioSink::start()
Returns a pointer to the QIODevice being used to handle the data transfer. This QIODevice can be used to write() audio data directly.
[pure virtual]
QAudio::State QPlatformAudioSink::state() const
Returns the state of audio processing.
[pure virtual]
void QPlatformAudioSink::stop()
Stops the audio output.
[pure virtual]
void QPlatformAudioSink::suspend()
Stops processing audio data, preserving buffered audio data.
[virtual]
qreal QPlatformAudioSink::volume() const
Returns the volume in the range 0.0 and 1.0.
See also setVolume().
© 2024 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.