QIODevice sink that accumulates raw captured PCM bytes in memory.
More...
#include <audiorecorder.h>
|
| | AudioBufferDevice (QObject *parent=nullptr) |
| | Creates an empty in-memory audio sink.
|
| |
|
void | clear () |
| | Discards all buffered audio bytes.
|
| |
| QByteArray | takeBuffer () |
| | Moves the buffered audio payload out of the device.
|
| |
|
| qint64 | readData (char *data, qint64 maxSize) override |
| | Audio capture is write-only for this device.
|
| |
| qint64 | writeData (const char *data, qint64 maxSize) override |
| | Appends captured audio bytes to the in-memory buffer.
|
| |
QIODevice sink that accumulates raw captured PCM bytes in memory.
Definition at line 35 of file audiorecorder.h.
◆ AudioBufferDevice()
| AudioBufferDevice::AudioBufferDevice |
( |
QObject * |
parent = nullptr | ) |
|
|
explicit |
Creates an empty in-memory audio sink.
- Parameters
-
| parent | Optional QObject parent. |
◆ readData()
| qint64 AudioBufferDevice::readData |
( |
char * |
data, |
|
|
qint64 |
maxSize |
|
) |
| |
|
overrideprotected |
Audio capture is write-only for this device.
- Returns
- Always returns
-1.
◆ takeBuffer()
| QByteArray AudioBufferDevice::takeBuffer |
( |
| ) |
|
Moves the buffered audio payload out of the device.
- Returns
- Captured PCM bytes accumulated since the last clear or take.
◆ writeData()
| qint64 AudioBufferDevice::writeData |
( |
const char * |
data, |
|
|
qint64 |
maxSize |
|
) |
| |
|
overrideprotected |
Appends captured audio bytes to the in-memory buffer.
- Parameters
-
| data | Source byte range from Qt Multimedia. |
| maxSize | Number of bytes available. |
- Returns
- Number of bytes consumed.
The documentation for this class was generated from the following file: