mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
25 lines
443 B
C++
25 lines
443 B
C++
#ifndef AUDIOBUFFER_H
|
|
#define AUDIOBUFFER_H
|
|
|
|
#include <QIODevice>
|
|
#include <QByteArray>
|
|
|
|
class AudioBuffer : public QIODevice
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
explicit AudioBuffer();
|
|
~AudioBuffer();
|
|
|
|
qint64 readData(char *data, qint64 maxlen);
|
|
qint64 writeData(const char *data, qint64 len);
|
|
qint64 bytesAvailable() const;
|
|
qint64 bufferSize() const;
|
|
void clear();
|
|
|
|
private:
|
|
QByteArray buffer;
|
|
};
|
|
|
|
#endif // AUDIOBUFFER_H
|