dsphle - dkjb wii ( fixes issue 3415 )
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@7483 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
02fa44e473
commit
8ca38ef7b2
|
@ -240,12 +240,7 @@ void DSPHLE::DSP_SendAIBuffer(unsigned int address, unsigned int num_samples)
|
||||||
if (pMixer && address)
|
if (pMixer && address)
|
||||||
{
|
{
|
||||||
short* samples = (short*)HLEMemory_Get_Pointer(address);
|
short* samples = (short*)HLEMemory_Get_Pointer(address);
|
||||||
// Internal sample rate is always 32khz
|
|
||||||
pMixer->PushSamples(samples, num_samples);
|
pMixer->PushSamples(samples, num_samples);
|
||||||
|
|
||||||
// FIXME: Write the audio to a file
|
|
||||||
//if (log_ai)
|
|
||||||
// g_wave_writer.AddStereoSamples(samples, 8);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
soundStream->Update();
|
soundStream->Update();
|
||||||
|
|
|
@ -30,28 +30,44 @@
|
||||||
|
|
||||||
class CMailHandler;
|
class CMailHandler;
|
||||||
|
|
||||||
|
inline bool ExramRead(u32 _uAddress)
|
||||||
|
{
|
||||||
|
if (_uAddress & 0x10000000)
|
||||||
|
return true;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
inline u8 HLEMemory_Read_U8(u32 _uAddress)
|
inline u8 HLEMemory_Read_U8(u32 _uAddress)
|
||||||
{
|
{
|
||||||
_uAddress &= Memory::RAM_MASK;
|
if (ExramRead(_uAddress))
|
||||||
return Memory::m_pRAM[_uAddress];
|
return Memory::m_pEXRAM[_uAddress & Memory::EXRAM_MASK];
|
||||||
|
else
|
||||||
|
return Memory::m_pRAM[_uAddress & Memory::RAM_MASK];
|
||||||
}
|
}
|
||||||
|
|
||||||
inline u16 HLEMemory_Read_U16(u32 _uAddress)
|
inline u16 HLEMemory_Read_U16(u32 _uAddress)
|
||||||
{
|
{
|
||||||
_uAddress &= Memory::RAM_MASK;
|
if (ExramRead(_uAddress))
|
||||||
return Common::swap16(*(u16*)&Memory::m_pRAM[_uAddress]);
|
return Common::swap16(*(u16*)&Memory::m_pEXRAM[_uAddress & Memory::EXRAM_MASK]);
|
||||||
|
else
|
||||||
|
return Common::swap16(*(u16*)&Memory::m_pRAM[_uAddress & Memory::RAM_MASK]);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline u32 HLEMemory_Read_U32(u32 _uAddress)
|
inline u32 HLEMemory_Read_U32(u32 _uAddress)
|
||||||
{
|
{
|
||||||
_uAddress &= Memory::RAM_MASK;
|
if (ExramRead(_uAddress))
|
||||||
return Common::swap32(*(u32*)&Memory::m_pRAM[_uAddress]);
|
return Common::swap32(*(u32*)&Memory::m_pEXRAM[_uAddress & Memory::EXRAM_MASK]);
|
||||||
|
else
|
||||||
|
return Common::swap32(*(u32*)&Memory::m_pRAM[_uAddress & Memory::RAM_MASK]);
|
||||||
}
|
}
|
||||||
|
|
||||||
inline void* HLEMemory_Get_Pointer(u32 _uAddress)
|
inline void* HLEMemory_Get_Pointer(u32 _uAddress)
|
||||||
{
|
{
|
||||||
_uAddress &= Memory::RAM_MASK;
|
if (ExramRead(_uAddress))
|
||||||
return &Memory::m_pRAM[_uAddress];
|
return &Memory::m_pEXRAM[_uAddress & Memory::EXRAM_MASK];
|
||||||
|
else
|
||||||
|
return &Memory::m_pRAM[_uAddress & Memory::RAM_MASK];
|
||||||
}
|
}
|
||||||
|
|
||||||
class IUCode
|
class IUCode
|
||||||
|
|
Loading…
Reference in New Issue