Committing a patch by KrossX3 that should fix the stereo expansion option for *most* people.
Of course on my setup it fails to grab the correct number of speakers, so will have to think about it..
The code is correct though, so it should fix it for some people :p

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@3035 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
ramapcsx2 2010-05-17 13:02:09 +00:00
parent 879d4942b9
commit a11cb73f5b
1 changed files with 6 additions and 3 deletions

View File

@ -265,8 +265,11 @@ public:
XAUDIO2_DEVICE_DETAILS deviceDetails;
pXAudio2->GetDeviceDetails( 0, &deviceDetails );
// Defaults to Stereo
int speakers = 2;
// nChannels gives the current Windows' Speaker setup (6 if 5.1)
if( StereoExpansionEnabled )
deviceDetails.OutputFormat.Format.nChannels = 6;
speakers = deviceDetails.OutputFormat.Format.nChannels;
// Any windows driver should support stereo at the software level, I should think!
jASSUME( deviceDetails.OutputFormat.Format.nChannels > 1 );
@ -274,14 +277,14 @@ public:
//
// Create a mastering voice
//
if ( FAILED(hr = pXAudio2->CreateMasteringVoice( &pMasteringVoice, deviceDetails.OutputFormat.Format.nChannels, SampleRate ) ) )
if ( FAILED(hr = pXAudio2->CreateMasteringVoice( &pMasteringVoice, speakers, SampleRate ) ) )
{
SysMessage( "Failed creating mastering voice: %#X\n", hr );
CoUninitialize();
return -1;
}
switch( deviceDetails.OutputFormat.Format.nChannels )
switch( speakers )
{
case 2:
ConLog( "* SPU2 > Using normal 2 speaker stereo output.\n" );