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
qpulsehelpers_p.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QPULSEHELPER_H
5#define QPULSEHELPER_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 "qaudiodevice.h"
19#include <qaudioformat.h>
20#include <pulse/pulseaudio.h>
21#include <QtCore/QLoggingCategory>
22#include <QtCore/qdebug.h>
23
25
26Q_DECLARE_LOGGING_CATEGORY(qLcPulseAudioOut)
27Q_DECLARE_LOGGING_CATEGORY(qLcPulseAudioIn)
28Q_DECLARE_LOGGING_CATEGORY(qLcPulseAudioEngine)
29
31{
32 void operator()(pa_operation *op) const { pa_operation_unref(op); }
33};
34
35using PAOperationUPtr = std::unique_ptr<pa_operation, PAOperationDeleter>;
36
37namespace QPulseAudioInternal
38{
39pa_sample_spec audioFormatToSampleSpec(const QAudioFormat &format);
40QAudioFormat sampleSpecToAudioFormat(const pa_sample_spec &spec);
41pa_channel_map channelMapForAudioFormat(const QAudioFormat &format);
43
44QUtf8StringView currentError(const pa_context *);
45QUtf8StringView currentError(const pa_stream *);
46
47} // namespace QPulseAudioInternal
48
49QDebug operator<<(QDebug, pa_stream_state_t);
50QDebug operator<<(QDebug, pa_sample_format);
51QDebug operator<<(QDebug, pa_context_state_t);
52
54
55#endif
The QAudioFormat class stores audio stream parameter information.
ChannelConfig
\variable QAudioFormat::NChannelPositions
\inmodule QtCore
QMap< QString, QString > map
[6]
QUtf8StringView currentError(const pa_context *context)
pa_channel_map channelMapForAudioFormat(const QAudioFormat &format)
QAudioFormat::ChannelConfig channelConfigFromMap(const pa_channel_map &map)
QAudioFormat sampleSpecToAudioFormat(const pa_sample_spec &spec)
pa_sample_spec audioFormatToSampleSpec(const QAudioFormat &format)
Combined button and popup list for selecting options.
#define Q_DECLARE_LOGGING_CATEGORY(name)
GLint GLsizei GLsizei GLenum format
std::unique_ptr< pa_operation, PAOperationDeleter > PAOperationUPtr
QDebug operator<<(QDebug, pa_stream_state_t)
void operator()(pa_operation *op) const