From: <man...@us...> - 2015-05-04 16:56:42
|
Revision: 5044 http://sourceforge.net/p/modplug/code/5044 Author: manxorist Date: 2015-05-04 16:56:37 +0000 (Mon, 04 May 2015) Log Message: ----------- [Ref] Since r4037, the current per-device samplerate gets always propagated to the mixer samplerate when opening a sound device. I.e. the latter has no real actual meaning anymore since then. The old ASIO-specific fix to set the mixer samplerate to the ASIO device's samplerate if it had, for whatever reason, been saved to the INI as 0, is no longer useful. Remove it and always just sanitize the mixer samplerate to the default when found invalid. Revision Links: -------------- http://sourceforge.net/p/modplug/code/4037 Modified Paths: -------------- trunk/OpenMPT/mptrack/MainFrm.cpp trunk/OpenMPT/mptrack/TrackerSettings.cpp Modified: trunk/OpenMPT/mptrack/MainFrm.cpp =================================================================== --- trunk/OpenMPT/mptrack/MainFrm.cpp 2015-05-04 16:16:08 UTC (rev 5043) +++ trunk/OpenMPT/mptrack/MainFrm.cpp 2015-05-04 16:56:37 UTC (rev 5044) @@ -244,17 +244,6 @@ dev = theApp.GetSoundDevicesManager()->FindDeviceInfoBestMatch(dev, TrackerSettings::Instance().m_SoundDevicePreferSameTypeIfDeviceUnavailable).GetIdentifier(); TrackerSettings::Instance().SetSoundDeviceIdentifier(dev); } - if(TrackerSettings::Instance().MixerSamplerate == 0) - { - TrackerSettings::Instance().MixerSamplerate = MixerSettings().gdwMixingFreq; - #ifndef NO_ASIO - // If no mixing rate is specified and we're using ASIO, get a mixing rate supported by the device. - if(SoundDevice::ParseType(dev) == SoundDevice::TypeASIO) - { - TrackerSettings::Instance().MixerSamplerate = theApp.GetSoundDevicesManager()->GetDeviceDynamicCaps(dev, TrackerSettings::Instance().GetSampleRates(), CMainFrame::GetMainFrame(), CMainFrame::GetMainFrame()->gpSoundDevice).currentSampleRate; - } - #endif // NO_ASIO - } // Setup timer OnUpdateUser(NULL); Modified: trunk/OpenMPT/mptrack/TrackerSettings.cpp =================================================================== --- trunk/OpenMPT/mptrack/TrackerSettings.cpp 2015-05-04 16:16:08 UTC (rev 5043) +++ trunk/OpenMPT/mptrack/TrackerSettings.cpp 2015-05-04 16:56:37 UTC (rev 5044) @@ -486,6 +486,10 @@ { m_SoundDeviceDirectSoundOldDefaultIdentifier = true; } + if(MixerSamplerate == 0) + { + MixerSamplerate = MixerSettings().gdwMixingFreq; + } if(storedVersion < MAKE_VERSION_NUMERIC(1,21,01,26)) { MixerFlags &= ~OLD_SOUNDSETUP_REVERSESTEREO; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |