Skip to content

Commit

Permalink
Will not write endlessly when starting the program or when setting ou…
Browse files Browse the repository at this point in the history
…tput to wav writer (#557)
  • Loading branch information
aargirakis committed Oct 24, 2024
1 parent ece75d0 commit cb9f551
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions src/app/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3663,6 +3663,10 @@ void MainWindow::on_buttonPrev_clicked()
playPrevSong();
}
}
void MainWindow::setOutputDeviceSetting(int outputDevice)
{
m_outputDevice = outputDevice;
}
void MainWindow::setOutputDevice(int outputDevice,QString fullPath)
{
{
Expand Down
1 change: 1 addition & 0 deletions src/app/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ class MainWindow : public QMainWindow
void restoreFromTray();
void SaveSettings();
void setOutputDevice(int outputDevice, QString);
void setOutputDeviceSetting(int outputDevice);
int getOutputDevice();
void setResetVolume(bool resetVolume);
bool getResetVolume();
Expand Down
2 changes: 1 addition & 1 deletion src/app/settingswindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -654,7 +654,7 @@ void settingsWindow::on_buttonOK_clicked()
{
if(ui->comboBox->itemData(ui->comboBox->currentIndex()).toInt()!=mainWindow->getOutputDevice())
{
mainWindow->setOutputDevice(ui->comboBox->itemData(ui->comboBox->currentIndex()).toInt(),"");
mainWindow->setOutputDeviceSetting(ui->comboBox->itemData(ui->comboBox->currentIndex()).toInt());
}
bool checkedResetVolume = ui->checkBoxResetVolume->checkState()==Qt::Checked ? true : false;
bool checkedSystrayOnQuit = ui->checkBoxSystrayOnQuit->checkState()==Qt::Checked ? true : false;
Expand Down

0 comments on commit cb9f551

Please sign in to comment.