2022-11-05 05:44:10 +00:00
|
|
|
#ifndef AUDIOOUTPUT_H
|
|
|
|
#define AUDIOOUTPUT_H
|
|
|
|
|
|
|
|
#include <QObject>
|
|
|
|
#include <QScopedPointer>
|
|
|
|
|
|
|
|
class AudioOutputPrivate;
|
|
|
|
class AudioOutput: public QObject
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
AudioOutput( QObject * parent = nullptr );
|
|
|
|
~AudioOutput();
|
|
|
|
|
|
|
|
bool play( const uint8_t * data, qint64 len );
|
|
|
|
void setAudioFormat( int sampleRate, int channels );
|
2023-07-25 06:22:56 +00:00
|
|
|
void stop();
|
2023-07-20 08:02:22 +00:00
|
|
|
|
2022-11-05 05:44:10 +00:00
|
|
|
protected:
|
|
|
|
QScopedPointer< AudioOutputPrivate > d_ptr;
|
|
|
|
|
|
|
|
private:
|
|
|
|
Q_DISABLE_COPY( AudioOutput )
|
|
|
|
Q_DECLARE_PRIVATE( AudioOutput )
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
#endif // AUDIOOUTPUT_H
|