goldendict-ng/src/audiooutput.hh
YiFang Xiao 5db4491505 fix: simultaneous playing sound in wikipedia
click the audio link repeatly in wikipedia will cuase the sound to play simultaneously

[autofix.ci] apply automated fixes
2023-07-27 11:29:20 +08:00

28 lines
508 B
C++

#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 );
void stop();
protected:
QScopedPointer< AudioOutputPrivate > d_ptr;
private:
Q_DISABLE_COPY( AudioOutput )
Q_DECLARE_PRIVATE( AudioOutput )
};
#endif // AUDIOOUTPUT_H