update
This commit is contained in:
parent
6fbe03fa8d
commit
55b9554321
1 changed files with 35 additions and 35 deletions
|
@ -226,38 +226,38 @@ QString CSoundBase::SetDev ( const int iNewDev )
|
|||
return strReturn;
|
||||
}
|
||||
|
||||
QVector<QString> CSoundBase::LoadAndInitializeFirstValidDriver()
|
||||
{
|
||||
QVector<QString> vsErrorList;
|
||||
|
||||
// load and initialize first valid ASIO driver
|
||||
bool bValidDriverDetected = false;
|
||||
int iCurDriverIdx = 0;
|
||||
|
||||
// try all available drivers in the system ("lNumDevs" devices)
|
||||
while ( !bValidDriverDetected && ( iCurDriverIdx < lNumDevs ) )
|
||||
{
|
||||
// try to load and initialize current driver, store error message
|
||||
const QString strCurError =
|
||||
LoadAndInitializeDriver ( iCurDriverIdx );
|
||||
|
||||
vsErrorList.append ( strCurError );
|
||||
|
||||
if ( strCurError.isEmpty() )
|
||||
{
|
||||
// initialization was successful
|
||||
bValidDriverDetected = true;
|
||||
|
||||
// store ID of selected driver
|
||||
lCurDev = iCurDriverIdx;
|
||||
|
||||
// empty error list shows that init was successful
|
||||
vsErrorList.clear();
|
||||
}
|
||||
|
||||
// try next driver
|
||||
iCurDriverIdx++;
|
||||
}
|
||||
|
||||
return vsErrorList;
|
||||
}
|
||||
QVector<QString> CSoundBase::LoadAndInitializeFirstValidDriver()
|
||||
{
|
||||
QVector<QString> vsErrorList;
|
||||
|
||||
// load and initialize first valid ASIO driver
|
||||
bool bValidDriverDetected = false;
|
||||
int iCurDriverIdx = 0;
|
||||
|
||||
// try all available drivers in the system ("lNumDevs" devices)
|
||||
while ( !bValidDriverDetected && ( iCurDriverIdx < lNumDevs ) )
|
||||
{
|
||||
// try to load and initialize current driver, store error message
|
||||
const QString strCurError =
|
||||
LoadAndInitializeDriver ( iCurDriverIdx );
|
||||
|
||||
vsErrorList.append ( strCurError );
|
||||
|
||||
if ( strCurError.isEmpty() )
|
||||
{
|
||||
// initialization was successful
|
||||
bValidDriverDetected = true;
|
||||
|
||||
// store ID of selected driver
|
||||
lCurDev = iCurDriverIdx;
|
||||
|
||||
// empty error list shows that init was successful
|
||||
vsErrorList.clear();
|
||||
}
|
||||
|
||||
// try next driver
|
||||
iCurDriverIdx++;
|
||||
}
|
||||
|
||||
return vsErrorList;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue