some small cleanups

This commit is contained in:
Volker Fischer 2020-03-21 10:27:31 +01:00
parent f55c669e5e
commit fccbb4144c
3 changed files with 13 additions and 26 deletions

1
.gitignore vendored
View file

@ -17,6 +17,7 @@ moc_predefs.h
src/res/qrc_resources.cpp
windows/ASIOSDK2
debug/
jamulus.sln
jamulus.vcxproj
jamulus.vcxproj.filters
release/

View file

@ -650,27 +650,16 @@ void CClient::Stop()
void CClient::Init()
{
// check if possible frame size factors are supported
const int iFraSizePreffered =
FRAME_SIZE_FACTOR_PREFERRED * SYSTEM_FRAME_SIZE_SAMPLES;
const int iFraSizePreffered = FRAME_SIZE_FACTOR_PREFERRED * SYSTEM_FRAME_SIZE_SAMPLES;
const int iFraSizeDefault = FRAME_SIZE_FACTOR_DEFAULT * SYSTEM_FRAME_SIZE_SAMPLES;
const int iFraSizeSafe = FRAME_SIZE_FACTOR_SAFE * SYSTEM_FRAME_SIZE_SAMPLES;
bFraSiFactPrefSupported =
( Sound.Init ( iFraSizePreffered ) == iFraSizePreffered );
const int iFraSizeDefault =
FRAME_SIZE_FACTOR_DEFAULT * SYSTEM_FRAME_SIZE_SAMPLES;
bFraSiFactDefSupported =
( Sound.Init ( iFraSizeDefault ) == iFraSizeDefault );
const int iFraSizeSafe =
FRAME_SIZE_FACTOR_SAFE * SYSTEM_FRAME_SIZE_SAMPLES;
bFraSiFactSafeSupported =
( Sound.Init ( iFraSizeSafe ) == iFraSizeSafe );
bFraSiFactPrefSupported = ( Sound.Init ( iFraSizePreffered ) == iFraSizePreffered );
bFraSiFactDefSupported = ( Sound.Init ( iFraSizeDefault ) == iFraSizeDefault );
bFraSiFactSafeSupported = ( Sound.Init ( iFraSizeSafe ) == iFraSizeSafe );
// translate block size index in actual block size
const int iPrefMonoFrameSize =
iSndCrdPrefFrameSizeFactor * SYSTEM_FRAME_SIZE_SAMPLES;
const int iPrefMonoFrameSize = iSndCrdPrefFrameSizeFactor * SYSTEM_FRAME_SIZE_SAMPLES;
// get actual sound card buffer size using preferred size
iMonoBlockSizeSam = Sound.Init ( iPrefMonoFrameSize );
@ -700,8 +689,7 @@ void CClient::Init()
// overwrite block size by smallest supported buffer size
iSndCrdFrameSizeFactor = FRAME_SIZE_FACTOR_PREFERRED;
iMonoBlockSizeSam =
SYSTEM_FRAME_SIZE_SAMPLES * FRAME_SIZE_FACTOR_PREFERRED;
iMonoBlockSizeSam = SYSTEM_FRAME_SIZE_SAMPLES * FRAME_SIZE_FACTOR_PREFERRED;
iStereoBlockSizeSam = 2 * iMonoBlockSizeSam;

View file

@ -197,8 +197,7 @@ QString CSoundBase::SetDev ( const int iNewDev )
for ( int i = 0; i < lNumDevs; i++ )
{
sErrorMessage += "<li><b>" + GetDeviceName ( i ) + "</b>: " +
vsErrorList[i] + "</li>";
sErrorMessage += "<li><b>" + GetDeviceName ( i ) + "</b>: " + vsErrorList[i] + "</li>";
}
sErrorMessage += "</ul>";
@ -222,8 +221,7 @@ QVector<QString> CSoundBase::LoadAndInitializeFirstValidDriver()
while ( !bValidDriverDetected && ( iCurDriverIdx < lNumDevs ) )
{
// try to load and initialize current driver, store error message
const QString strCurError =
LoadAndInitializeDriver ( iCurDriverIdx );
const QString strCurError = LoadAndInitializeDriver ( iCurDriverIdx );
vsErrorList.append ( strCurError );