From 992a453a68873c18aecd955de488f9f56d2c46a8 Mon Sep 17 00:00:00 2001 From: "ramapcsx2.code" Date: Thu, 23 Jan 2014 15:19:43 +0000 Subject: [PATCH] SPU2-X: The preferred audio output module is PortAudio, so making it the default under Windows now (it is already on Linux). It will use wasapi mode with the default sound device by default, both are configurable though. This setup gives us better latency and a higher time stretch polling frequency, resulting in better quality overall. With this we can also lower the main latency default from 150ms to now 100ms. There is no error checking for the wasapi mode selection yet, as I don't know how this should be done. Help would be appreciated (gigaherz!) :p git-svn-id: http://pcsx2.googlecode.com/svn/trunk@5821 96395faa-99c1-11dd-bbfe-3dabce05a288 --- plugins/spu2-x/src/SndOut_Portaudio.cpp | 2 +- plugins/spu2-x/src/Windows/Config.cpp | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/spu2-x/src/SndOut_Portaudio.cpp b/plugins/spu2-x/src/SndOut_Portaudio.cpp index f95f08170a..c0fb8f0dbd 100644 --- a/plugins/spu2-x/src/SndOut_Portaudio.cpp +++ b/plugins/spu2-x/src/SndOut_Portaudio.cpp @@ -582,7 +582,7 @@ public: // By default on linux use the ALSA API (+99% users) -- Gregory CfgReadStr( L"PORTAUDIO", L"HostApi", api, L"ALSA" ); #else - CfgReadStr( L"PORTAUDIO", L"HostApi", api, L"Unknown" ); + CfgReadStr( L"PORTAUDIO", L"HostApi", api, L"WASAPI" ); #endif CfgReadStr( L"PORTAUDIO", L"Device", m_Device, L"default" ); diff --git a/plugins/spu2-x/src/Windows/Config.cpp b/plugins/spu2-x/src/Windows/Config.cpp index ac0fc934a8..3244499154 100644 --- a/plugins/spu2-x/src/Windows/Config.cpp +++ b/plugins/spu2-x/src/Windows/Config.cpp @@ -43,7 +43,7 @@ bool postprocess_filter_enabled = 1; bool postprocess_filter_dealias = false; // OUTPUT -int SndOutLatencyMS = 150; +int SndOutLatencyMS = 100; int SynchMode = 0; // Time Stretch, Async or Disabled u32 OutputModule = 0; @@ -73,7 +73,7 @@ void ReadSettings() if ( FinalVolume > 1.0f) FinalVolume = 1.0f; numSpeakers = CfgReadInt( L"OUTPUT", L"SpeakerConfiguration", 0); dplLevel = CfgReadInt( L"OUTPUT", L"DplDecodingLevel", 0); - SndOutLatencyMS = CfgReadInt(L"OUTPUT",L"Latency", 150); + SndOutLatencyMS = CfgReadInt(L"OUTPUT",L"Latency", 100); if((SynchMode == 0) && (SndOutLatencyMS < LATENCY_MIN_TS)) // can't use low-latency with timestretcher atm SndOutLatencyMS = LATENCY_MIN_TS; @@ -81,7 +81,7 @@ void ReadSettings() SndOutLatencyMS = LATENCY_MIN; wchar_t omodid[128]; - CfgReadStr( L"OUTPUT", L"Output_Module", omodid, 127, XAudio2Out->GetIdent() ); + CfgReadStr(L"OUTPUT", L"Output_Module", omodid, 127, PortaudioOut->GetIdent()); // find the driver index of this module: OutputModule = FindOutputModuleById( omodid );