Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qambisonicdecoder_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 QAMBISONICDECODER_P_H
4#define QAMBISONICDECODER_P_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
18#include <qaudioformat.h>
19
21
24
26{
27public:
39
40 bool hasValidConfig() const { return outputChannels > 0; }
41
42 int nInputChannels() const { return inputChannels; }
43 int nOutputChannels() const { return outputChannels; }
44
45 int outputSize(int nSamples) const { return outputChannels * nSamples; }
46
47 // input is planar, output interleaved
48 void processBuffer(const float *input[], float *output, int nSamples);
49 void processBuffer(const float *input[], short *output, int nSamples);
50
51 void processBufferWithReverb(const float *input[], const float *reverb[2], short *output, int nSamples);
52
53 static constexpr int maxAmbisonicChannels = 16;
54 static constexpr int maxAmbisonicLevel = 3;
55private:
56 QAudioFormat::ChannelConfig channelConfig;
58 int inputChannels = 0;
59 int outputChannels = 0;
60 const QAmbisonicDecoderData *decoderData = nullptr;
61 QAmbisonicDecoderFilter *filters = nullptr;
62 float *simpleDecoderFactors = nullptr;
63 const float *reverbFactors = nullptr;
64};
65
66
68
69#endif
static constexpr int maxAmbisonicChannels
void processBuffer(const float *input[], float *output, int nSamples)
int outputSize(int nSamples) const
static constexpr int maxAmbisonicLevel
bool hasValidConfig() const
void processBufferWithReverb(const float *input[], const float *reverb[2], short *output, int nSamples)
QAmbisonicDecoder(AmbisonicLevel ambisonicLevel, const QAudioFormat &format)
The QAudioFormat class stores audio stream parameter information.
ChannelConfig
\variable QAudioFormat::NChannelPositions
Combined button and popup list for selecting options.
GLenum GLuint GLint level
GLint GLsizei GLsizei GLenum format
GLenum GLenum GLenum input
QT_BEGIN_NAMESPACE typedef uchar * output