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,12 +195,14 @@ AudioProvider *AudioProviderFactoryManager::GetAudioProvider(wxString filename,
|
||||||
// Prepare provider
|
// Prepare provider
|
||||||
AudioProvider *provider = NULL;
|
AudioProvider *provider = NULL;
|
||||||
|
|
||||||
|
if (!Options.AsBool(_T("Audio Disable PCM Provider"))) {
|
||||||
// Try a PCM provider first
|
// Try a PCM provider first
|
||||||
provider = CreatePCMAudioProvider(filename);
|
provider = CreatePCMAudioProvider(filename);
|
||||||
if (provider) {
|
if (provider) {
|
||||||
if (provider->GetBytesPerSample() == 2 && provider->GetSampleRate() >= 32000) return provider;
|
if (provider->GetBytesPerSample() == 2 && provider->GetSampleRate() >= 32000) return provider;
|
||||||
return new ConvertAudioProvider(provider);
|
return new ConvertAudioProvider(provider);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// List of providers
|
// List of providers
|
||||||
wxArrayString list = GetFactoryList(Options.AsText(_T("Audio provider")));
|
wxArrayString list = GetFactoryList(Options.AsText(_T("Audio provider")));
|
||||||
|
|
|
@ -208,6 +208,7 @@ void OptionsManager::LoadDefaults(bool onlyDefaults,bool doOverride) {
|
||||||
SetText(_T("Audio Alsa Device"), _T("default:0"));
|
SetText(_T("Audio Alsa Device"), _T("default:0"));
|
||||||
SetText(_T("Audio HD Cache Location"),_T("default"),1700);
|
SetText(_T("Audio HD Cache Location"),_T("default"),1700);
|
||||||
SetText(_T("Audio HD Cache Name"),_T("audio%02i.tmp"),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
|
// Technically these can do with just the spectrum object being re-created
|
||||||
SetInt(_T("Audio Spectrum Cutoff"),0);
|
SetInt(_T("Audio Spectrum Cutoff"),0);
|
||||||
SetInt(_T("Audio Spectrum Quality"),1);
|
SetInt(_T("Audio Spectrum Quality"),1);
|
||||||
|
|
Loading…
Reference in a new issue