mirror of
https://github.com/vanilla-wiiu/vanilla.git
synced 2025-01-22 08:11:47 -05:00
30 lines
No EOL
470 B
C++
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
|