Remove vacuous write of /GUI/EnvdBRange ...

... but see code comments about the apparent original intent, to update some
other preference instead; which I don't do, thus preserving present behavior
This commit is contained in:
Paul Licameli 2019-04-05 21:01:14 -04:00
parent f3e8620756
commit 3bc95e610a
1 changed files with 10 additions and 3 deletions

View File

@ -1771,9 +1771,16 @@ int AudioIO::StartStream(const TransportTracks &tracks,
dBRange = gPrefs->Read(ENV_DB_KEY, ENV_DB_RANGE);
if(silenceLevelDB < -dBRange)
{
silenceLevelDB = -dBRange + 3; // meter range was made smaller than SilenceLevel
gPrefs->Write(ENV_DB_KEY, dBRange); // so set SilenceLevel reasonable
gPrefs->Flush();
silenceLevelDB = -dBRange + 3;
// meter range was made smaller than SilenceLevel
// so set SilenceLevel reasonable
// PRL: update prefs, or correct it only in-session?
// The behavior (as of 2.3.1) was the latter, the code suggested that
// the intent was the former; I preserve the behavior, but uncomment
// this if you disagree.
// gPrefs->Write(wxT("/AudioIO/SilenceLevel"), silenceLevelDB);
// gPrefs->Flush();
}
mSilenceLevel = (silenceLevelDB + dBRange)/(double)dBRange; // meter goes -dBRange dB -> 0dB