blob: ffc4a00be73ad0d944affbb1ca17de08ebd7e770 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
// Copyright (C) 2017 The Qt Company Ltd.
// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause
#ifndef AUDIODEVICES_H
#define AUDIODEVICES_H
#include <QAudioDevice>
#include <QMediaDevices>
#include <QMainWindow>
#include <QObject>
#include "ui_audiodevicesbase.h"
class AudioDevicesBase : public QMainWindow, public Ui::AudioDevicesBase
{
public:
AudioDevicesBase(QWidget *parent = 0);
virtual ~AudioDevicesBase();
};
class AudioTest : public AudioDevicesBase
{
Q_OBJECT
public:
explicit AudioTest(QWidget *parent = nullptr);
private:
QAudioDevice m_deviceInfo;
QAudioFormat m_settings;
QAudioDevice::Mode m_mode = QAudioDevice::Input;
QMediaDevices *m_devices = nullptr;
private slots:
void updateAudioDevices();
void modeChanged(int idx);
void deviceChanged(int idx);
void sampleRateChanged(int idx);
void channelChanged(int idx);
void sampleFormatChanged(int idx);
void test();
void populateTable();
};
#endif
|