Add secret option to disable use of the PCM provider, mainly intended for debugging: "Audio Disable PCM Provider" (default is false ie. PCM provider enabled)
Originally committed to SVN as r2232.
This commit is contained in:
parent
2c7da25e91
commit
155388b456
2 changed files with 8 additions and 5 deletions
|
@ -195,11 +195,13 @@ AudioProvider *AudioProviderFactoryManager::GetAudioProvider(wxString filename,
|
|||
// Prepare provider
|
||||
AudioProvider *provider = NULL;
|
||||
|
||||
// Try a PCM provider first
|
||||
provider = CreatePCMAudioProvider(filename);
|
||||
if (provider) {
|
||||
if (provider->GetBytesPerSample() == 2 && provider->GetSampleRate() >= 32000) return provider;
|
||||
return new ConvertAudioProvider(provider);
|
||||
if (!Options.AsBool(_T("Audio Disable PCM Provider"))) {
|
||||
// Try a PCM provider first
|
||||
provider = CreatePCMAudioProvider(filename);
|
||||
if (provider) {
|
||||
if (provider->GetBytesPerSample() == 2 && provider->GetSampleRate() >= 32000) return provider;
|
||||
return new ConvertAudioProvider(provider);
|
||||
}
|
||||
}
|
||||
|
||||
// List of providers
|
||||
|
|
|
@ -208,6 +208,7 @@ void OptionsManager::LoadDefaults(bool onlyDefaults,bool doOverride) {
|
|||
SetText(_T("Audio Alsa Device"), _T("default:0"));
|
||||
SetText(_T("Audio HD Cache Location"),_T("default"),1700);
|
||||
SetText(_T("Audio HD Cache Name"),_T("audio%02i.tmp"),1700);
|
||||
SetBool(_T("Audio Disable PCM Provider"), false);
|
||||
// Technically these can do with just the spectrum object being re-created
|
||||
SetInt(_T("Audio Spectrum Cutoff"),0);
|
||||
SetInt(_T("Audio Spectrum Quality"),1);
|
||||
|
|
Loading…
Reference in a new issue