Skip to content

Commit

Permalink
Audio: Remove latency setting.
Browse files Browse the repository at this point in the history
This setting only changes some internal values that are shown in tests not
to match PSP behavior.  Removed, it now matches how the PSP works.

This setting wasn't really affecting any actual audio latency.
See #11844.
  • Loading branch information
unknownbrackets committed Apr 8, 2020
1 parent 2405157 commit 0912e9e
Show file tree
Hide file tree
Showing 5 changed files with 4 additions and 33 deletions.
1 change: 0 additions & 1 deletion Core/Config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -785,7 +785,6 @@ static ConfigSetting graphicsSettings[] = {
static ConfigSetting soundSettings[] = {
ConfigSetting("Enable", &g_Config.bEnableSound, true, true, true),
ConfigSetting("AudioBackend", &g_Config.iAudioBackend, 0, true, true),
ConfigSetting("AudioLatency", &g_Config.iAudioLatency, 1, true, true),
ConfigSetting("ExtraAudioBuffering", &g_Config.bExtraAudioBuffering, false, true, false),
ConfigSetting("AudioResampler", &g_Config.bAudioResampler, true, true, true),
ConfigSetting("GlobalVolume", &g_Config.iGlobalVolume, VOLUME_MAX, true, true),
Expand Down
1 change: 0 additions & 1 deletion Core/Config.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,6 @@ struct Config {

// Sound
bool bEnableSound;
int iAudioLatency; // 0 = low , 1 = medium(default) , 2 = high
int iAudioBackend;
int iGlobalVolume;
int iAltSpeedVolume;
Expand Down
31 changes: 4 additions & 27 deletions Core/HLE/__sceAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,12 +53,6 @@ AudioDebugStats g_AudioDebugStats;
// atomic locks are used on the lock. TODO: make this lock-free
std::atomic_flag atomicLock_;

enum latency {
LOW_LATENCY = 0,
MEDIUM_LATENCY = 1,
HIGH_LATENCY = 2,
};

int eventAudioUpdate = -1;
int eventHostAudioUpdate = -1;
int mixFrequency = 44100;
Expand Down Expand Up @@ -110,27 +104,10 @@ void __AudioInit() {
mixFrequency = 44100;
srcFrequency = 0;

switch (g_Config.iAudioLatency) {
case LOW_LATENCY:
chanQueueMaxSizeFactor = 1;
chanQueueMinSizeFactor = 1;
hwBlockSize = 16;
hostAttemptBlockSize = 256;
break;
case MEDIUM_LATENCY:
chanQueueMaxSizeFactor = 2;
chanQueueMinSizeFactor = 1;
hwBlockSize = 64;
hostAttemptBlockSize = 512;
break;
case HIGH_LATENCY:
chanQueueMaxSizeFactor = 4;
chanQueueMinSizeFactor = 2;
hwBlockSize = 64;
hostAttemptBlockSize = 512;
break;

}
chanQueueMaxSizeFactor = 2;
chanQueueMinSizeFactor = 1;
hwBlockSize = 64;
hostAttemptBlockSize = 512;

__AudioCPUMHzChange();

Expand Down
3 changes: 0 additions & 3 deletions UI/GameSettingsScreen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -542,9 +542,6 @@ void GameSettingsScreen::CreateViews() {
audioSettings->Add(new CheckBox(&g_Config.bAutoAudioDevice, a->T("Switch on new audio device")));
#endif

static const char *latency[] = { "Low", "Medium", "High" };
PopupMultiChoice *lowAudio = audioSettings->Add(new PopupMultiChoice(&g_Config.iAudioLatency, a->T("Audio Latency"), latency, 0, ARRAY_SIZE(latency), gr->GetName(), screenManager()));
lowAudio->SetEnabledPtr(&g_Config.bEnableSound);
#if defined(__ANDROID__)
CheckBox *extraAudio = audioSettings->Add(new CheckBox(&g_Config.bExtraAudioBuffering, a->T("AudioBufferingForBluetooth", "Bluetooth-friendly buffer (slower)")));
extraAudio->SetEnabledPtr(&g_Config.bEnableSound);
Expand Down
1 change: 0 additions & 1 deletion headless/Headless.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,6 @@ int main(int argc, const char* argv[])
g_Config.bHighQualityDepth = true;
g_Config.bMemStickInserted = true;
g_Config.bFragmentTestCache = true;
g_Config.iAudioLatency = 1;
g_Config.bEnableWlan = true;
g_Config.sMACAddress = "12:34:56:78:9A:BC";

Expand Down

0 comments on commit 0912e9e

Please sign in to comment.