Qt 6.x
The Qt SDK
Loading...
Searching...
No Matches
qquick3daudioengine.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-3.0-only
4#include <qaudiodevice.h>
5
7
8static QAudioEngine *globalEngine = nullptr;
9
45{
46 auto *e = getEngine();
50}
51
53{
54}
55
78{
80}
81
83{
85}
86
93{
95}
96
98{
99 return globalEngine->outputDevice();
100}
101
108{
110}
111
113{
114 return globalEngine->masterVolume();
115}
116
118{
119 if (!globalEngine) {
122 }
123 return globalEngine;
124}
125
127
128#include "moc_qquick3daudioengine_p.cpp"
IOBluetoothDevice * device
The QAudioDevice class provides an information about audio devices and their functionality.
\inmodule QtSpatialAudio
OutputMode
\value Surround Map the sounds to the loudspeaker configuration of the output device.
void outputDeviceChanged()
QAudioDevice outputDevice
Sets or returns the device that is being used for playing the sound field.
void setOutputDevice(const QAudioDevice &device)
void setOutputMode(OutputMode mode)
OutputMode outputMode
Sets or retrieves the current output mode of the engine.
void outputModeChanged()
float masterVolume
Sets or returns volume being used to render the sound field.
void setMasterVolume(float volume)
void start()
Starts the engine.
void masterVolumeChanged()
static QMetaObject::Connection connect(const QObject *sender, const char *signal, const QObject *receiver, const char *member, Qt::ConnectionType=Qt::AutoConnection)
\threadsafe
Definition qobject.cpp:2823
QQuick3DAudioEngine()
\qmltype AudioEngine \inqmlmodule QtQuick3D.SpatialAudio
void setOutputDevice(const QAudioDevice &device)
\qmlproperty QtMultimedia.AudioDevice AudioEngine::outputDevice
static QAudioEngine * getEngine()
void setMasterVolume(float volume)
\qmlproperty float AudioEngine::masterVolume
void setOutputMode(OutputMode mode)
\qmlproperty enumeration AudioEngine::outputMode
double e
Combined button and popup list for selecting options.
GLenum mode
static QT_BEGIN_NAMESPACE QAudioEngine * globalEngine