DSPHLE: Added an option for 48khz output and supporting upsampling code.

Games that have higher frequency sounds and music should sound a bit better using 48k. 

I don't have any games that use DTKMusic so that upsampling code untested. If you get strange sounds only at 48k try toggling dtk music to see if that isolates the problem and let me know.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6383 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
mylek4
2010-11-12 03:39:07 +00:00
parent c6d95c9087
commit 67f850dd37
9 changed files with 149 additions and 109 deletions

View File

@ -250,9 +250,15 @@ unsigned short DSP_WriteControlRegister(unsigned short _Value)
{
if (!Temp.DSPHalt && Temp.DSPInit)
{
unsigned int AISampleRate, DACSampleRate;
unsigned int AISampleRate, DACSampleRate, BackendSampleRate;
g_dspInitialize.pGetSampleRate(AISampleRate, DACSampleRate);
soundStream = AudioCommon::InitSoundStream(new HLEMixer(AISampleRate, DACSampleRate));
std::string frequency = ac_Config.sFrequency;
if (frequency == "48,000 Hz")
BackendSampleRate = 48000;
else
BackendSampleRate = 32000;
soundStream = AudioCommon::InitSoundStream(new HLEMixer(AISampleRate, DACSampleRate, BackendSampleRate));
if(!soundStream) PanicAlert("Error starting up sound stream");
// Mixer is initialized
g_InitMixer = true;