/**************************************************************************** ** ** Copyright (C) 2021 The Qt Company Ltd. ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the Qt Toolkit. ** ** $QT_BEGIN_LICENSE:COMM$ ** ** Commercial License Usage ** Licensees holding valid commercial Qt licenses may use this file in ** accordance with the commercial license agreement provided with the ** Software or, alternatively, in accordance with the terms contained in ** a written agreement between you and The Qt Company. For licensing terms ** and conditions see https://www.qt.io/terms-conditions. For further ** information use the contact form at https://www.qt.io/contact-us. ** ** $QT_END_LICENSE$ ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ** ****************************************************************************/ #ifndef QAUDIOOUTPUT_H #define QAUDIOOUTPUT_H #include #include #include #include #include #include QT_BEGIN_NAMESPACE class QAbstractAudioOutput; class Q_MULTIMEDIA_EXPORT QAudioOutput : public QObject { Q_OBJECT public: explicit QAudioOutput(const QAudioFormat &format = QAudioFormat(), QObject *parent = nullptr); explicit QAudioOutput(const QAudioDeviceInfo &audioDeviceInfo, const QAudioFormat &format = QAudioFormat(), QObject *parent = nullptr); ~QAudioOutput(); QAudioFormat format() const; void start(QIODevice *device); QIODevice* start(); void stop(); void reset(); void suspend(); void resume(); void setBufferSize(int bytes); int bufferSize() const; int bytesFree() const; int periodSize() const; void setNotifyInterval(int milliSeconds); int notifyInterval() const; qint64 processedUSecs() const; qint64 elapsedUSecs() const; QAudio::Error error() const; QAudio::State state() const; void setVolume(qreal); qreal volume() const; QString category() const; void setCategory(const QString &category); Q_SIGNALS: void stateChanged(QAudio::State state); void notify(); private: Q_DISABLE_COPY(QAudioOutput) QAbstractAudioOutput* d; }; QT_END_NAMESPACE #endif // QAUDIOOUTPUT_H