| 1 | // Copyright (C) 2025 The Qt Company Ltd. |
| 2 | // SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only |
| 3 | |
| 4 | #ifndef QSOUNDEFFECT_P_H |
| 5 | #define QSOUNDEFFECT_P_H |
| 6 | |
| 7 | // |
| 8 | // W A R N I N G |
| 9 | // ------------- |
| 10 | // |
| 11 | // This file is not part of the Qt API. It exists purely as an |
| 12 | // implementation detail. This header file may change from version to |
| 13 | // version without notice, or even be removed. |
| 14 | // |
| 15 | // We mean it. |
| 16 | // |
| 17 | |
| 18 | #include <QtCore/qobject.h> |
| 19 | #include <QtCore/private/qobject_p.h> |
| 20 | #include <QtCore/qurl.h> |
| 21 | #include <QtCore/qloggingcategory.h> |
| 22 | #include <QtMultimedia/qaudio.h> |
| 23 | #include <QtMultimedia/qsoundeffect.h> |
| 24 | #include <QtMultimedia/qaudiodevice.h> |
| 25 | #include <QtMultimedia/qtmultimediaglobal.h> |
| 26 | #include <QtMultimedia/private/qsamplecache_p.h> |
| 27 | |
| 28 | QT_BEGIN_NAMESPACE |
| 29 | |
| 30 | Q_DECLARE_LOGGING_CATEGORY(qLcSoundEffect) |
| 31 | |
| 32 | class QSoundEffectPrivate : public QObjectPrivate |
| 33 | { |
| 34 | public: |
| 35 | virtual bool setAudioDevice(QAudioDevice device) = 0; |
| 36 | virtual QAudioDevice audioDevice() const = 0; |
| 37 | virtual bool setSource(const QUrl &, QSampleCache &) = 0; |
| 38 | virtual QUrl url() const = 0; |
| 39 | |
| 40 | virtual QSoundEffect::Status status() const = 0; |
| 41 | |
| 42 | virtual int loopCount() const = 0; |
| 43 | virtual bool setLoopCount(int) = 0; |
| 44 | virtual int loopsRemaining() const = 0; |
| 45 | |
| 46 | virtual float volume() const = 0; |
| 47 | virtual bool setVolume(float) = 0; |
| 48 | virtual bool muted() const = 0; |
| 49 | virtual bool setMuted(bool) = 0; |
| 50 | |
| 51 | virtual void play() = 0; |
| 52 | virtual void stop() = 0; |
| 53 | virtual bool playing() const = 0; |
| 54 | |
| 55 | static Q_MULTIMEDIA_EXPORT QSoundEffectPrivate *get(QSoundEffect *); |
| 56 | }; |
| 57 | |
| 58 | QT_END_NAMESPACE |
| 59 | |
| 60 | #endif // QSOUNDEFFECT_P_H |
| 61 | |