File indexing completed on 2024-04-21 15:32:41

0001 /*
0002     SPDX-FileCopyrightText: 2018 Nicolas Fella <nicolas.fella@gmx.de>
0003 
0004     SPDX-License-Identifier: LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
0005 */
0006 #ifndef STREAMRESTORE_P_H
0007 #define STREAMRESTORE_P_H
0008 
0009 #include "streamrestore.h"
0010 #include <QVector>
0011 #include <pulse/ext-stream-restore.h>
0012 
0013 namespace PulseAudioQt
0014 {
0015 class StreamRestorePrivate
0016 {
0017 public:
0018     explicit StreamRestorePrivate(StreamRestore *q);
0019     virtual ~StreamRestorePrivate();
0020 
0021     void writeChanges(const pa_cvolume &volume, bool muted, const QString &device);
0022     void update(const pa_ext_stream_restore_info *info);
0023 
0024     StreamRestore *q;
0025     QString m_device;
0026     pa_cvolume m_volume;
0027     pa_channel_map m_channelMap;
0028     QVector<QString> m_channels;
0029     bool m_muted = false;
0030     quint32 m_index = 0;
0031 
0032     struct {
0033         bool valid = false;
0034         pa_cvolume volume;
0035         bool muted;
0036         QString device;
0037     } m_cache;
0038 };
0039 
0040 }
0041 
0042 #endif