-
Notifications
You must be signed in to change notification settings - Fork 240
Don't imply that multiple drivers have errors #2168
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -167,23 +167,32 @@ QString CSoundBase::SetDev ( const QString strDevName ) | |
| if ( !vsErrorList.isEmpty() ) | ||
| { | ||
| // create error message with all details | ||
| QString sErrorMessage = "<b>" + QString ( tr ( "No usable %1 audio device found." ) ).arg ( strSystemDriverTechniqueName ) + | ||
| "</b><br><br>" + tr ( "These are all the available drivers with error messages:" ) + "<ul>"; | ||
| QString sErrorMessage = tr ( "<b>No usable %1 audio device found.</b><br><br>" ).arg ( strSystemDriverTechniqueName ); | ||
|
|
||
| for ( int i = 0; i < lNumDevs; i++ ) | ||
| { | ||
| sErrorMessage += "<li><b>" + GetDeviceName ( i ) + "</b>: " + vsErrorList[i] + "</li>"; | ||
| sErrorMessage += "<b>" + GetDeviceName ( i ) + "</b>: " + vsErrorList[i] + "<br><br>"; | ||
| } | ||
| sErrorMessage += "</ul>"; | ||
|
|
||
| #ifdef _WIN32 | ||
| #if defined( _WIN32 ) && !defined( WITH_JACK ) | ||
| // to be able to access the ASIO driver setup for changing, e.g., the sample rate, we | ||
| // offer the user under Windows that we open the driver setups of all registered | ||
| // ASIO drivers | ||
| sErrorMessage += "<br/>" + tr ( "Do you want to open the ASIO driver setup to try changing your configuration to a working state?" ); | ||
| sErrorMessage += "<br>" + tr ( "You may be able to fix errors in the driver settings." ); | ||
|
|
||
| if ( QMessageBox::Yes == QMessageBox::information ( nullptr, APP_NAME, sErrorMessage, QMessageBox::Yes | QMessageBox::No ) ) | ||
| // for Windows use a QMessageBox to show the error | ||
| QMessageBox qmASIOWarningBox; | ||
| QPushButton* btnASIOSettings = qmASIOWarningBox.addButton ( tr ( "Open ASIO settings" ), QMessageBox::AcceptRole ); | ||
|
|
||
| qmASIOWarningBox.addButton ( QMessageBox::Cancel ); | ||
| qmASIOWarningBox.setText ( sErrorMessage ); | ||
| qmASIOWarningBox.setIcon ( QMessageBox::Warning ); | ||
| qmASIOWarningBox.exec(); | ||
|
|
||
| if ( qmASIOWarningBox.clickedButton() == btnASIOSettings ) | ||
| { | ||
| // TODO: This or some related code aborts the app even if the driver is valid after user changes. | ||
| // This should be handled differently. For reference, please see https://github.com/jamulussoftware/jamulus/pull/2168 | ||
|
Comment on lines
+194
to
+195
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @pljones I wrote a TODO comment here. |
||
| LoadAndInitializeFirstValidDriver ( true ); | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think there's more work needed then just that. See the commit I mentioned: Probably it's in a deeper level. |
||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lines 154 to 165 are irrelevant if this we enter this
if. They should be placed after the block.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might the problem be that this code is run once at startup and also during runtime if someone changes the sound devices?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Before line 197 was introduced, the variable set there wasn't referenced until after this if block. However, now line 197 is there, it makes sense.