From d839f1911971e9799e5e12497ceb74810ebb8724 Mon Sep 17 00:00:00 2001 From: "Jake.Stine" Date: Sat, 1 Nov 2008 21:04:22 +0000 Subject: [PATCH] SPU2ghz: XAudio2 driver now initializes a 48khz output rate (was using the default of 44.1khz). This may help fix some of the XA2 crashing problems as well. git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@267 a6443dda-0b58-4228-96e9-037be469359c --- plugins/spu2ghz/spu2.cpp | 2 -- plugins/spu2ghz/xaudio2out.cpp | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/spu2ghz/spu2.cpp b/plugins/spu2ghz/spu2.cpp index 56a509748e..cd582bfdef 100644 --- a/plugins/spu2ghz/spu2.cpp +++ b/plugins/spu2ghz/spu2.cpp @@ -21,8 +21,6 @@ #include "regtable.h" -#define SYNC_DISTANCE 4800 - void StartVoices(int core, u32 value); void StopVoices(int core, u32 value); diff --git a/plugins/spu2ghz/xaudio2out.cpp b/plugins/spu2ghz/xaudio2out.cpp index 730bf218a3..7b69863b19 100644 --- a/plugins/spu2ghz/xaudio2out.cpp +++ b/plugins/spu2ghz/xaudio2out.cpp @@ -103,7 +103,7 @@ public: // // Create a mastering voice // - if ( FAILED(hr = pXAudio2->CreateMasteringVoice( &pMasteringVoice ) ) ) + if ( FAILED(hr = pXAudio2->CreateMasteringVoice( &pMasteringVoice, 0, SampleRate ) ) ) { SysMessage( "Failed creating mastering voice: %#X\n", hr ); SAFE_RELEASE( pXAudio2 ); @@ -130,7 +130,7 @@ public: // Create an XAudio2 voice to stream this wave // if( FAILED(hr = pXAudio2->CreateSourceVoice( &pSourceVoice, &wfx, - XAUDIO2_VOICE_NOPITCH, 1.0f, &voiceContext ) ) ) + XAUDIO2_VOICE_NOSRC, 1.0f, &voiceContext ) ) ) { SysMessage( "Error %#X creating source voice\n", hr ); SAFE_RELEASE( pXAudio2 );