diff --git a/src/kdasioconfig/CMakeLists.txt b/src/kdasioconfig/CMakeLists.txt
index ef0be1a..9623625 100644
--- a/src/kdasioconfig/CMakeLists.txt
+++ b/src/kdasioconfig/CMakeLists.txt
@@ -11,6 +11,8 @@ set(CMAKE_AUTORCC ON)
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
+enable_language("RC")
+
find_package(QT NAMES Qt6 COMPONENTS Widgets REQUIRED)
find_package(Qt6 COMPONENTS Widgets REQUIRED)
find_package(Qt6 COMPONENTS Multimedia REQUIRED)
diff --git a/src/kdasioconfig/images/INFO BTN OFF.png b/src/kdasioconfig/images/INFO BTN OFF.png
index 020ce16..d9368bd 100644
Binary files a/src/kdasioconfig/images/INFO BTN OFF.png and b/src/kdasioconfig/images/INFO BTN OFF.png differ
diff --git a/src/kdasioconfig/kdasioconfig.cpp b/src/kdasioconfig/kdasioconfig.cpp
index 36bf22d..b8faf78 100644
--- a/src/kdasioconfig/kdasioconfig.cpp
+++ b/src/kdasioconfig/kdasioconfig.cpp
@@ -24,6 +24,11 @@ KdASIOConfigBase::~KdASIOConfigBase() {}
KdASIOConfig::KdASIOConfig(QWidget *parent)
: KdASIOConfigBase(parent)
{
+ this->setAttribute(Qt::WA_AlwaysShowToolTips,true);
+
+ // init mmcpl proc
+ mmcplProc = nullptr;
+
// set up signals
connect(sharedPushButton, &QPushButton::clicked, this, &KdASIOConfig::sharedModeSet);
connect(exclusivePushButton, &QPushButton::clicked, this, &KdASIOConfig::exclusiveModeSet);
@@ -33,19 +38,14 @@ KdASIOConfig::KdASIOConfig(QWidget *parent)
connect(outputAudioSettButton, &QPushButton::pressed, this, &KdASIOConfig::outputAudioSettClicked);
connect(bufferSizeSlider, &QSlider::valueChanged, this, &KdASIOConfig::bufferSizeChanged);
connect(bufferSizeSlider, &QSlider::valueChanged, this, &KdASIOConfig::bufferSizeDisplayChange);
- // info buttons
- connect(inputInfoButton, &QPushButton::pressed, this, &KdASIOConfig::inputInfoClicked);
- connect(outputInfoButton, &QPushButton::pressed, this, &KdASIOConfig::outputInfoClicked);
- connect(renderInfoButton, &QPushButton::pressed, this, &KdASIOConfig::renderInfoClicked);
- connect(bufferInfoButton, &QPushButton::pressed, this, &KdASIOConfig::bufferInfoClicked);
// connect footer buttons
connect(koordLiveButton, &QPushButton::pressed, this, &KdASIOConfig::koordLiveClicked);
connect(githubButton, &QPushButton::pressed, this, &KdASIOConfig::githubClicked);
-
-// bufferSizeDisplay->setStyleSheet("background-color: black");
-
+ connect(versionButton, &QPushButton::pressed, this, &KdASIOConfig::versionButtonClicked);
+ // for URLs
koordLiveButton->setCursor(Qt::PointingHandCursor);
githubButton->setCursor(Qt::PointingHandCursor);
+ versionButton->setCursor(Qt::PointingHandCursor);
// populate input device choices
inputDeviceBox->clear();
@@ -53,7 +53,6 @@ KdASIOConfig::KdASIOConfig(QWidget *parent)
for (auto &deviceInfo: input_devices)
inputDeviceBox->addItem(deviceInfo.description(), QVariant::fromValue(deviceInfo));
-
// populate output device choices
outputDeviceBox->clear();
const auto output_devices = m_devices->audioOutputs();
@@ -182,6 +181,7 @@ void KdASIOConfig::writeTomlFile()
// need to explicitly set UTF-8 for non-ASCII character support
out.setEncoding(QStringConverter::Utf8);
// out.setCodec("UTF-8");
+ //FIXME should really write to intermediate buffer, THEN to file - to make single write on file
out << "backend = \"Windows WASAPI\"" << "\n";
out << "bufferSizeSamples = " << bufferSize << "\n";
out << "\n";
@@ -230,8 +230,8 @@ void KdASIOConfig::setOperationMode()
void KdASIOConfig::sharedModeSet()
{
sharedPushButton->setChecked(true);
- qDebug() << "sharedButt: " << sharedPushButton->isChecked();
- qDebug() << "exclusiveButt: " << exclusivePushButton->isChecked();
+// qDebug() << "sharedButt: " << sharedPushButton->isChecked();
+// qDebug() << "exclusiveButt: " << exclusivePushButton->isChecked();
exclusive_mode = false;
writeTomlFile();
}
@@ -239,8 +239,8 @@ void KdASIOConfig::sharedModeSet()
void KdASIOConfig::exclusiveModeSet()
{
exclusivePushButton->setChecked(true);
- qDebug() << "sharedButt: " << sharedPushButton->isChecked();
- qDebug() << "exclusiveButt: " << exclusivePushButton->isChecked();
+// qDebug() << "sharedButt: " << sharedPushButton->isChecked();
+// qDebug() << "exclusiveButt: " << exclusivePushButton->isChecked();
exclusive_mode = true;
writeTomlFile();
}
@@ -268,103 +268,56 @@ void KdASIOConfig::outputDeviceChanged(int idx)
void KdASIOConfig::inputAudioSettClicked()
{
// open Windows audio input settings control panel
- QProcess *myProcess = new QProcess(this);
- myProcess->startDetached("control", QStringList() << inputAudioSettPath);
+ //FIXME - this process control does NOT work as Windows forks+kills the started process immediately? or something
+ if (mmcplProc != nullptr) {
+ mmcplProc->kill();
+ }
+ mmcplProc = new QProcess(this);
+ mmcplProc->start("control", QStringList() << inputAudioSettPath);
}
void KdASIOConfig::outputAudioSettClicked()
{
// open Windows audio output settings control panel
- QProcess *myProcess = new QProcess(this);
- myProcess->startDetached("control", QStringList() << outputAudioSettPath);
+ //FIXME - this process control does NOT work as Windows forks+kills the started process immediately? or something
+ if (mmcplProc != nullptr) {
+ mmcplProc->kill();
+ }
+ mmcplProc = new QProcess(this);
+ mmcplProc->start("control", QStringList() << outputAudioSettPath);
}
-void KdASIOConfig::inputInfoClicked()
-{
- QDialog *qd = new QDialog(this);
- QLabel *qlab = new QLabel();
- QString inputInfoText = "" +
- tr ( "AUDIO INPUT DEVICE - Tips" ) +
- " " +
- "
" + "
" +
- "Choose your Audio Input Device here, eg your microphone. " +
- "
" + "
" +
- "Click the tool button to go to Windows audio control panel and configure.";
- qlab->setText(inputInfoText);
- QVBoxLayout *layout = new QVBoxLayout();
- layout->addWidget(qlab);
- qd->setLayout(layout);
- qd->setPalette(QPalette("#1d1f21"));
- qd->show();
-}
+//void KdASIOConfig::bufferInfoClicked()
+//{
+// QDialog *qd = new QDialog(this);
+// QLabel *qlab = new QLabel();
+// QString inputInfoText = "" +
+// tr ( "BUFFER SIZE - Tips" ) +
+// " " +
+// "
" + "
" +
+// "Select the size of the ASIO Buffer, by the number of samples. " +
+// "
" + "
" +
+// "A lower size may cause glitches in your sound, while higher size causes higher latency.";
+// qlab->setText(inputInfoText);
+// QVBoxLayout *layout = new QVBoxLayout();
+// layout->addWidget(qlab);
+// qd->setLayout(layout);
+// qd->setPalette(QPalette("#1d1f21"));
+// qd->show();
+//}
-void KdASIOConfig::outputInfoClicked()
-{
- QDialog *qd = new QDialog(this);
- QLabel *qlab = new QLabel();
- QString outputInfoText = "" +
- tr ( "AUDIO OUTPUT DEVICE - Tips" ) +
- " " +
- "
" + "
" +
- "Choose your Audio Output Device here, eg your headphones. " +
- "
" + "
" +
- "Click the tool button to go to Windows audio control panel and configure.";
- qlab->setText(outputInfoText);
- QVBoxLayout *layout = new QVBoxLayout();
- layout->addWidget(qlab);
- qd->setLayout(layout);
- qd->setPalette(QPalette("#1d1f21"));
- qd->show();
-}
-
-void KdASIOConfig::renderInfoClicked()
-{
- QDialog *qd = new QDialog(this);
- QLabel *qlab = new QLabel();
- QString renderInfoText = "" +
- tr ( "RENDERING MODE - Tips" ) +
- " " +
- "
" + "
" +
- "Choose between Shared and Exclusive modes, provided by the WASAPI Windows audio system." +
- "
" + "
" +
- "Shared Mode: mix ASIO with regular Windows audio." +
- "
" + "
" +
- "Exclusive Mode: lowest latency, locks out access from other audio applications."
- ;
- qlab->setText(renderInfoText);
- QVBoxLayout *layout = new QVBoxLayout();
- layout->addWidget(qlab);
- qd->setLayout(layout);
- qd->setPalette(QPalette("#1d1f21"));
- qd->show();
-}
-
-void KdASIOConfig::bufferInfoClicked()
+void KdASIOConfig::koordLiveClicked()
{
- QDialog *qd = new QDialog(this);
- QLabel *qlab = new QLabel();
- QString inputInfoText = "" +
- tr ( "BUFFER SIZE - Tips" ) +
- " " +
- "
" + "
" +
- "Select the size of the ASIO Buffer, by the number of samples. " +
- "
" + "
" +
- "A lower size may cause glitches in your sound, while higher size causes higher latency.";
- qlab->setText(inputInfoText);
- QVBoxLayout *layout = new QVBoxLayout();
- layout->addWidget(qlab);
- qd->setLayout(layout);
- qd->setPalette(QPalette("#1d1f21"));
- qd->show();
+ QDesktopServices::openUrl(QUrl("https://koord.live", QUrl::TolerantMode));
}
-void KdASIOConfig::koordLiveClicked()
+void KdASIOConfig::versionButtonClicked()
{
- QDesktopServices::openUrl(QUrl("https://koord.live", QUrl::TolerantMode));
+ QDesktopServices::openUrl(QUrl("https://github.com/koord-live/KoordASIO/releases", QUrl::TolerantMode));
}
void KdASIOConfig::githubClicked()
{
- QDesktopServices::openUrl(QUrl("https://github.com/koord-live/KoordASIO/releases", QUrl::TolerantMode));
+ QDesktopServices::openUrl(QUrl("https://github.com/koord-live/KoordASIO", QUrl::TolerantMode));
}
diff --git a/src/kdasioconfig/kdasioconfig.h b/src/kdasioconfig/kdasioconfig.h
index 2ea1a48..39d2aff 100644
--- a/src/kdasioconfig/kdasioconfig.h
+++ b/src/kdasioconfig/kdasioconfig.h
@@ -57,6 +57,7 @@
#include
#include
#include
+#include
#include "toml.h"
#include "ui_kdasioconfigbase.h"
@@ -91,6 +92,7 @@ class KdASIOConfig : public KdASIOConfigBase
QString inputAudioSettPath = "mmsys.cpl,,1";
QString outputAudioSettPath = "mmsys.cpl";
QList bufferSizes = { 32, 64, 128, 256, 512, 1024, 2048 };
+ QProcess *mmcplProc;
private slots:
void bufferSizeChanged(int idx);
@@ -106,12 +108,9 @@ private slots:
void setValuesFromToml(std::ifstream *ifs, toml::ParseResult *pr);
void inputAudioSettClicked();
void outputAudioSettClicked();
- void inputInfoClicked();
- void outputInfoClicked();
- void renderInfoClicked();
- void bufferInfoClicked();
void koordLiveClicked();
void githubClicked();
+ void versionButtonClicked();
};
#endif
diff --git a/src/kdasioconfig/kdasioconfigbase.ui b/src/kdasioconfig/kdasioconfigbase.ui
index 3e57ec6..7b610cc 100644
--- a/src/kdasioconfig/kdasioconfigbase.ui
+++ b/src/kdasioconfig/kdasioconfigbase.ui
@@ -34,8 +34,8 @@
KoordASIO Control
-
- ../../koord-realtime/android/res/drawable-hdpi/icon.png../../koord-realtime/android/res/drawable-hdpi/icon.png
+
+ :/img/mainicon.ico:/img/mainicon.ico
@@ -103,7 +103,7 @@
0
-
-
+
0
@@ -138,7 +138,7 @@
-
-
+
16777215
@@ -151,6 +151,9 @@
8
+
+
+
color: gray;
@@ -200,7 +203,7 @@
0
-
-
+
0
@@ -257,6 +260,9 @@
0
+
+ Open sound Recording devices control panel
+
false
@@ -269,8 +275,8 @@
- 25
- 25
+ 28
+ 28
@@ -279,7 +285,7 @@
-
-
+
0
@@ -288,48 +294,24 @@
- 0
- 0
+ 25
+ 25
-
-
- PreferDefault
-
-
-
-
-
-
-
-
-
-
-
-
- false
-
-
-
-
-
-
- :/img/images/INFO BTN OFF.png:/img/images/INFO BTN OFF.png
-
-
+
25
25
-
- false
+
+ <html><head/><body><p><span style=" font-weight:700;">AUDIO INPUT DEVICE - Tips</span></p><p>Choose your Audio Input Device here, eg your microphone.</p><p>For best results, you should select a choice from the same hardware device as the Output device.</p><p>If you don't see your device listed here, you may need to configure it in Windows.</p><p>Click the tool button to pop up the Windows audio control panel for Recording devices, where you can manage your audio inputs. (You may need to close and re-open KoordASIO Control to refresh the device list.)</p><p>Hint: to set the sample rate, select the Device, click Properties, and select the "Advanced" tab. </p></body></html>
-
- false
+
+ image: url(:/img/images/INFO BTN OFF.png);
-
- true
+
+
@@ -647,7 +629,7 @@ QComboBox::down-arrow:on { /* shift the arrow when popup is open */
0
-
-
+
0
@@ -697,6 +679,9 @@ QComboBox::down-arrow:on { /* shift the arrow when popup is open */
0
+
+ Open sound Playback devices control panel
+
@@ -706,8 +691,8 @@ QComboBox::down-arrow:on { /* shift the arrow when popup is open */
- 25
- 25
+ 28
+ 28
@@ -716,7 +701,7 @@ QComboBox::down-arrow:on { /* shift the arrow when popup is open */
-
-
+
0
@@ -724,39 +709,19 @@ QComboBox::down-arrow:on { /* shift the arrow when popup is open */
-
- 0
- 0
-
-
-
- false
-
-
-
-
-
-
- :/img/images/INFO BTN OFF.png
- :/img/images/INFO BTN ON.png:/img/images/INFO BTN OFF.png
-
-
25
25
-
- true
-
-
- false
+
+ <html><head/><body><p><span style=" font-weight:700;">AUDIO OUTPUT DEVICE - Tips</span></p><p>Choose your Audio Output Device here, eg your headphones.</p><p>For best results, you should select a choice from the same hardware device as the Input device.</p><p>If you don't see your device listed here, you may need to configure it in Windows.</p><p>Click the tool button to pop up the Windows audio control panel for Playback devices, where you can manage your audio outputs. (You may need to close and re-open KoordASIO Control to refresh the device list.)</p><p>Hint: to set the sample rate, select the Device, click Properties, and select the "Advanced" tab. </p></body></html>
-
- false
+
+ image: url(:/img/images/INFO BTN OFF.png);
-
- true
+
+
@@ -861,7 +826,7 @@ QComboBox::down-arrow:on { /* shift the arrow when popup is open */
15
- 7
+ 0
-
@@ -872,7 +837,13 @@ QComboBox::down-arrow:on { /* shift the arrow when popup is open */
0
-
-
+
+
+
+ 0
+ 0
+
+
Rubik
@@ -905,34 +876,27 @@ QComboBox::down-arrow:on { /* shift the arrow when popup is open */
-
-
+
-
+
0
0
-
- false
-
-
-
-
-
-
- :/img/images/INFO BTN OFF.png:/img/images/INFO BTN OFF.png
-
-
+
25
25
-
- false
+
+ <html><head/><body><p><span style=" font-size:10pt; font-weight:700;">AUDIO RENDERING MODE - Tips</span></p><p>Choose between Shared and Exclusive modes, provided by the WASAPI Windows audio system. </p><p><span style=" font-weight:700;">Shared Mode: </span>lets you use the same audio device simultaneously for both ASIO and non-ASIO audio applications, so you can mix ASIO with "regular" Windows audio. This results in higher latency: you can expect between 10-20ms on a generic audio chipset.</p><p><span style=" font-weight:700;">Exclusive Mode: </span>provides the lowest latency (less than 10ms), and bit-perfect operation. This mode locks out access to the audio device from other (non-ASIO) audio applications. </p><p>Note: depending on your audio hardware, using Exclusive mode <span style=" font-style:italic;">may</span> result in glitches in the sound, which can be reduced by setting the Buffer Size to 512 samples or higher. If glitches still occur, please contact us via the Koord.Live link at the bottom of the window and give us a description of the issue.</p></body></html>
-
- true
+
+ image: url(:/img/images/INFO BTN OFF.png);
+
+
+
@@ -947,13 +911,13 @@ QComboBox::down-arrow:on { /* shift the arrow when popup is open */
0
- 7
+ 0
0
- 7
+ 0
-
@@ -1143,15 +1107,24 @@ QComboBox::down-arrow:on { /* shift the arrow when popup is open */
15
- 3
+ 0
-
7
+
+ 0
+
-
+
+
+ 0
+ 0
+
+
Rubik
@@ -1183,34 +1156,48 @@ QComboBox::down-arrow:on { /* shift the arrow when popup is open */
-
-
+
-
+
0
0
-
- false
-
-
-
-
-
-
- :/img/images/INFO BTN OFF.png:/img/images/INFO BTN OFF.png
+
+
+ 25
+ 25
+
-
+
25
25
-
+
+ <html><head/><body><p><span style=" font-weight:700;">BUFFER SIZE - Tips</span></p><p>Select the size of the ASIO Buffer, by the number of samples.</p><p>A lower buffer size gives lower latency but may cause glitches in your sound.</p><p>Make the buffer size larger if you experience glitches.</p><p>Note: DAW software such as Ableton Live may report inaccurate latency statistics - this is a known current issue.</p></body></html>
+
+
+ 0
+
+
+ image: url(:/img/images/INFO BTN OFF.png);
+
+
+ 0
+
+
+
+
+
false
-
- true
+
+ 0
+
+
+ Qt::NoTextInteraction
@@ -1225,13 +1212,13 @@ QComboBox::down-arrow:on { /* shift the arrow when popup is open */
8
- 7
+ 0
8
- 7
+ 0
-
@@ -1379,22 +1366,22 @@ QSlider::sub-page:horizontal {
- 7
+ 0
- 15
+ 5
0
- 15
+ 0
0
-
-
+
0
@@ -1407,6 +1394,9 @@ QSlider::sub-page:horizontal {
16
+
+ <html><head/><body><p>ASIO is a trademark of <span style=" font-weight:700;">Steinberg Media Technologies GmbH</span>.</p></body></html>
+
image: url(:/img/images/Frame.png);
@@ -1436,6 +1426,9 @@ QSlider::sub-page:horizontal {
15
+
+ Open the Koord website
+
false
@@ -1470,8 +1463,50 @@ QSlider::sub-page:horizontal {
+ -
+
+
+
+ 0
+ 0
+
+
+
+
+ 50
+ 16777215
+
+
+
+
+ 8
+
+
+
+ Check for updates
+
+
+ color: gray;
+
+
+ v1.9.5
+
+
+ true
+
+
+
-
+
+
+ 0
+ 0
+
+
+
+ Source Code - Github
+
diff --git a/src/kdasioconfig/koordipics.qrc b/src/kdasioconfig/koordipics.qrc
index 4b65645..03a9d1e 100644
--- a/src/kdasioconfig/koordipics.qrc
+++ b/src/kdasioconfig/koordipics.qrc
@@ -15,5 +15,6 @@
images/SHARED OFF BTN.png
images/SHARED ON BTN.png
images/RoundedArrow4x.png
+ mainicon.ico
diff --git a/windows/kdinstaller.iss b/windows/kdinstaller.iss
index b68dcad..178c402 100644
--- a/windows/kdinstaller.iss
+++ b/windows/kdinstaller.iss
@@ -26,7 +26,7 @@ Source:"deploy\x86_64\KoordASIO.dll"; DestDir: "{app}"; Flags: ignoreversion reg
Source:"deploy\x86_64\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs 64bit; Check: Is64BitInstallMode
[Icons]
-Name: "{group}\KoordASIO Config"; Filename: "{app}\KoordASIOControl.exe"; WorkingDir: "{app}"
+Name: "{group}\KoordASIO Control"; Filename: "{app}\KoordASIOControl.exe"; WorkingDir: "{app}"
[Run]
Filename: "{app}\KoordASIOControl.exe"; Description: "Run KoordASIO Control"; Flags: postinstall nowait skipifsilent