vanilla/app/audiohandler.h
2024-05-23 18:47:04 -07:00

30 lines
No EOL
470 B
C++

#ifndef AUDIOHANDLER_H
#define AUDIOHANDLER_H
#include <QAudioSink>
#include <QMediaDevices>
#include <QObject>
class AudioHandler : public QObject
{
Q_OBJECT
public:
AudioHandler(QObject *parent = nullptr);
public slots:
void run();
void close();
void write(const QByteArray &data);
void setVolume(qreal vol);
private:
//QMediaDevices *m_mediaDevices;
QAudioSink *m_sink;
QIODevice *m_sinkDevice;
};
#endif // AUDIOHANDLER_H