mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-23 14:19:46 -06:00
Sound System Rework: Phase 1
. Fixed Sample Rate for DSP (Now if your CPU is capable to run game at 100%, you will get pure sound without buzz or static noise) . Fixed Sample Rate for AI (Now if your CPU is capable to run game at 100%, you will get sync'ed video and audio) . Fixed Backend list for DSPLLE . Improved Aduio DMA a bit (There might be a completely redesign in following phases) WARNING: The whole rework will take time to complete. This commit is compilable, but could be unstable. So you can try it and test it but don't take it as a release rev! git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4717 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@ -58,3 +58,9 @@ float Memory_Read_Float(u32 _uAddress)
|
||||
u32 uTemp = Memory_Read_U32(_uAddress);
|
||||
return *(float*)&uTemp;
|
||||
}
|
||||
|
||||
void* Memory_Get_Pointer(u32 _uAddress)
|
||||
{
|
||||
_uAddress &= RAM_MASK;
|
||||
return &g_pMemory[_uAddress];
|
||||
}
|
@ -43,6 +43,7 @@ u8 Memory_Read_U8(u32 _uAddress);
|
||||
u16 Memory_Read_U16(u32 _uAddress);
|
||||
u32 Memory_Read_U32(u32 _uAddress);
|
||||
float Memory_Read_Float(u32 _uAddress);
|
||||
void* Memory_Get_Pointer(u32 _uAddress);
|
||||
|
||||
extern PLUGIN_GLOBALS* globals;
|
||||
|
||||
|
@ -332,8 +332,10 @@ void DSP_SendAIBuffer(unsigned int address, int sample_rate)
|
||||
}
|
||||
|
||||
CMixer* pMixer = soundStream->GetMixer();
|
||||
if (pMixer)
|
||||
if (pMixer && address)
|
||||
{
|
||||
short* samples = (short*)Memory_Get_Pointer(address);
|
||||
/*
|
||||
short samples[16] = {0}; // interleaved stereo
|
||||
if (address)
|
||||
{
|
||||
@ -346,7 +348,7 @@ void DSP_SendAIBuffer(unsigned int address, int sample_rate)
|
||||
//if (log_ai)
|
||||
// g_wave_writer.AddStereoSamples(samples, 8);
|
||||
}
|
||||
|
||||
*/
|
||||
// sample_rate is usually 32k here,
|
||||
// see Core/DSP/DSP.cpp for better information
|
||||
pMixer->PushSamples(samples, 32 / 4, sample_rate);
|
||||
|
@ -105,6 +105,11 @@ void DSPConfigDialogLLE::AddBackend(const char* backend)
|
||||
#endif
|
||||
}
|
||||
|
||||
void DSPConfigDialogLLE::ClearBackends()
|
||||
{
|
||||
m_BackendSelection->Clear();
|
||||
}
|
||||
|
||||
DSPConfigDialogLLE::~DSPConfigDialogLLE()
|
||||
{
|
||||
}
|
||||
|
@ -35,6 +35,7 @@ public:
|
||||
long style = wxDEFAULT_DIALOG_STYLE);
|
||||
virtual ~DSPConfigDialogLLE();
|
||||
void AddBackend(const char *backend);
|
||||
void ClearBackends();
|
||||
|
||||
private:
|
||||
DECLARE_EVENT_TABLE();
|
||||
|
@ -145,6 +145,7 @@ void DllConfig(HWND _hParent)
|
||||
else if (!m_ConfigFrame->GetParent()->IsShown())
|
||||
m_ConfigFrame->Close(true);
|
||||
|
||||
m_ConfigFrame->ClearBackends();
|
||||
// add backends
|
||||
std::vector<std::string> backends = AudioCommon::GetSoundBackends();
|
||||
|
||||
|
Reference in New Issue
Block a user