-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmainwindow.cpp
More file actions
25 lines (21 loc) · 781 Bytes
/
Copy pathmainwindow.cpp
File metadata and controls
25 lines (21 loc) · 781 Bytes
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
#include "mainwindow.h"
#include "./ui_mainwindow.h"
#include <QAudioDevice>
#include <QMediaDevices>
MainWindow::MainWindow(QWidget *parent)
: QMainWindow(parent)
, ui(new Ui::MainWindow)
{
ui->setupUi(this);
const auto& devices = QMediaDevices::audioOutputs();
for (const auto& device : devices) {
QAudioDevice info(device);
qDebug() << "Device:" << device.description();
qDebug() << "Supported formats:" << device.supportedSampleFormats() << "," <<
"Supported channels:" << device.minimumChannelCount() << "-" << device.maximumChannelCount() << "," <<
"Supported sample rates:" << device.minimumSampleRate() << "-" << device.maximumSampleRate() << "\n";
}}
MainWindow::~MainWindow()
{
delete ui;
}