Skip to content

Commit

Permalink
Simplify device driver error message
Browse files Browse the repository at this point in the history
Split out from jamulussoftware#2168
  • Loading branch information
ann0see authored Mar 12, 2022
1 parent 9457baa commit f6b6008
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/soundbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -167,20 +167,18 @@ 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
// 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 (ASIO) settings. Do you want to open these settings now?" );

if ( QMessageBox::Yes == QMessageBox::information ( nullptr, APP_NAME, sErrorMessage, QMessageBox::Yes | QMessageBox::No ) )
{
Expand Down

0 comments on commit f6b6008

Please sign in to comment.