Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qsoundeffect_p.h
Go to the documentation of this file.
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/qsoundeffect.h>
23#include <QtMultimedia/qaudiodevice.h>
24#include <QtMultimedia/qtmultimediaglobal.h>
25#include <QtMultimedia/private/qsamplecache_p.h>
26#include <QtMultimedia/private/qmultimedia_source_resolver_p.h>
27
29
31
33{
34public:
35 virtual bool setAudioDevice(QAudioDevice device) = 0;
36 virtual QAudioDevice audioDevice() const = 0;
37
38 void resolveAndSetSource(const QUrl &, QSampleCache &);
39 QUrl url() const;
40
41 virtual QSoundEffect::Status status() const = 0;
42
43 virtual int loopCount() const = 0;
44 virtual bool setLoopCount(int) = 0;
45 virtual int loopsRemaining() const = 0;
46
47 virtual float volume() const = 0;
48 virtual bool setVolume(float) = 0;
49 virtual bool muted() const = 0;
50 virtual bool setMuted(bool) = 0;
51
52 virtual void play() = 0;
53 virtual void stop() = 0;
54 virtual bool playing() const = 0;
55
56 static Q_MULTIMEDIA_EXPORT QSoundEffectPrivate *get(QSoundEffect *);
57
60
64
65private:
66 virtual void setSource(QUrl, QSampleCache &) = 0;
67};
68
69QT_END_NAMESPACE
70
71#endif // QSOUNDEFFECT_P_H
virtual QSoundEffect::Status status() const =0
virtual void stop()=0
virtual void play()=0
virtual int loopCount() const =0
virtual void setSource(QUrl, QSampleCache &)=0
virtual bool muted() const =0
virtual int loopsRemaining() const =0
virtual float volume() const =0
std::unique_ptr< const AbstractSourceResolver > m_sourceResolver
virtual bool setMuted(bool)=0
virtual QAudioDevice audioDevice() const =0
virtual bool setVolume(float)=0
virtual bool setLoopCount(int)=0
void resolveAndSetSource(const QUrl &, QSampleCache &)
\qmlsignal QtMultimedia::SoundEffect::statusChanged()
virtual bool playing() const =0
virtual bool setAudioDevice(QAudioDevice device)=0
QT_BEGIN_NAMESPACE Q_DECLARE_LOGGING_CATEGORY(lcQIORing)