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
qquick3dspatialsound_p.h
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
3#ifndef QQUICK3DSPATIALSOUND_H
4#define QQUICK3DSPATIALSOUND_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <private/qquick3dnode_p.h>
18#include <QUrl>
19#include <qvector3d.h>
20#include <qspatialsound.h>
21
23
25{
26 Q_OBJECT
27 Q_PROPERTY(QUrl source READ source WRITE setSource NOTIFY sourceChanged)
40
41public:
44
45 void setSource(QUrl source);
46 QUrl source() const;
47
48 void setVolume(float volume);
49 float volume() const;
50
57
60
61 void setSize(float min);
62 float size() const;
63
64 void setDistanceCutoff(float max);
65 float distanceCutoff() const;
66
67 void setManualAttenuation(float attenuation);
68 float manualAttenuation() const;
69
70 void setOcclusionIntensity(float occlusion);
71 float occlusionIntensity() const;
72
73 void setDirectivity(float alpha);
74 float directivity() const;
75
76 void setDirectivityOrder(float alpha);
77 float directivityOrder() const;
78
79 void setNearFieldGain(float gain);
80 float nearFieldGain() const;
81
82 enum Loops
83 {
85 Once = 1
86 };
88
89 int loops() const;
90 void setLoops(int loops);
91
92 bool autoPlay() const;
93 void setAutoPlay(bool autoPlay);
94
95public Q_SLOTS:
96 void play();
97 void pause();
98 void stop();
99
113
114private Q_SLOTS:
115 void updatePosition();
116 void updateRotation();
117
118protected:
119 QSSGRenderGraphObject *updateSpatialNode(QSSGRenderGraphObject *) override { return nullptr; }
120
121private:
122 QSpatialSound *m_sound = nullptr;
123};
124
125QT_END_NAMESPACE
126
127#endif
QSSGRenderGraphObject * updateSpatialNode(QSSGRenderGraphObject *) override
void setDirectivity(float alpha)
\qmlproperty real SpatialSound::directivity
void setAutoPlay(bool autoPlay)
void manualAttenuationChanged()
void setManualAttenuation(float attenuation)
\qmlproperty real SpatialSound::manualAttenuation
QUrl source() const
\qmlproperty url SpatialSound::source
bool autoPlay() const
\qmlproperty bool SpatialSound::autoPlay
void pause()
\qmlmethod SpatialSound::pause()
void occlusionIntensityChanged()
void setDistanceCutoff(float max)
\qmlproperty real SpatialSound::distanceCutoff
void setDirectivityOrder(float alpha)
\qmlproperty real SpatialSound::directivityOrder
void setSize(float min)
\qmlproperty real SpatialSound::size
void stop()
\qmlmethod SpatialSound::stop()
void setDistanceModel(DistanceModel model)
\qmlproperty enumeration SpatialSound::distanceModel
QSSGRenderGraphObject * updateSpatialNode(QSSGRenderGraphObject *) override
void setVolume(float volume)
\qmlproperty real SpatialSound::volume
void directivityOrderChanged()
void setOcclusionIntensity(float occlusion)
\qmlproperty real SpatialSound::occlusionIntensity
DistanceModel distanceModel() const
void setNearFieldGain(float gain)
\qmlproperty real SpatialSound::nearFieldGain