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;
|
return strReturn;
|
||||||
}
|
}
|
||||||
|
|
||||||
QVector<QString> CSoundBase::LoadAndInitializeFirstValidDriver()
|
QVector<QString> CSoundBase::LoadAndInitializeFirstValidDriver()
|
||||||
{
|
{
|
||||||
QVector<QString> vsErrorList;
|
QVector<QString> vsErrorList;
|
||||||
|
|
||||||
// load and initialize first valid ASIO driver
|
// load and initialize first valid ASIO driver
|
||||||
bool bValidDriverDetected = false;
|
bool bValidDriverDetected = false;
|
||||||
int iCurDriverIdx = 0;
|
int iCurDriverIdx = 0;
|
||||||
|
|
||||||
// try all available drivers in the system ("lNumDevs" devices)
|
// try all available drivers in the system ("lNumDevs" devices)
|
||||||
while ( !bValidDriverDetected && ( iCurDriverIdx < lNumDevs ) )
|
while ( !bValidDriverDetected && ( iCurDriverIdx < lNumDevs ) )
|
||||||
{
|
{
|
||||||
// try to load and initialize current driver, store error message
|
// try to load and initialize current driver, store error message
|
||||||
const QString strCurError =
|
const QString strCurError =
|
||||||
LoadAndInitializeDriver ( iCurDriverIdx );
|
LoadAndInitializeDriver ( iCurDriverIdx );
|
||||||
|
|
||||||
vsErrorList.append ( strCurError );
|
vsErrorList.append ( strCurError );
|
||||||
|
|
||||||
if ( strCurError.isEmpty() )
|
if ( strCurError.isEmpty() )
|
||||||
{
|
{
|
||||||
// initialization was successful
|
// initialization was successful
|
||||||
bValidDriverDetected = true;
|
bValidDriverDetected = true;
|
||||||
|
|
||||||
// store ID of selected driver
|
// store ID of selected driver
|
||||||
lCurDev = iCurDriverIdx;
|
lCurDev = iCurDriverIdx;
|
||||||
|
|
||||||
// empty error list shows that init was successful
|
// empty error list shows that init was successful
|
||||||
vsErrorList.clear();
|
vsErrorList.clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
// try next driver
|
// try next driver
|
||||||
iCurDriverIdx++;
|
iCurDriverIdx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return vsErrorList;
|
return vsErrorList;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue