Global Variable: Rename _Audio to g_Audio

This commit is contained in:
zilmar 2012-11-17 13:27:46 +11:00
parent 7f248146b2
commit bd84758450
5 changed files with 15 additions and 15 deletions

View File

@ -457,7 +457,7 @@ void CMipsMemoryVM::Compile_LW (x86Reg Reg, DWORD VAddr ) {
UpdateCounters(m_RegWorkingSet,false, true); UpdateCounters(m_RegWorkingSet,false, true);
m_RegWorkingSet.SetBlockCycleCount(m_RegWorkingSet.GetBlockCycleCount() + CountPerOp()); m_RegWorkingSet.SetBlockCycleCount(m_RegWorkingSet.GetBlockCycleCount() + CountPerOp());
BeforeCallDirect(m_RegWorkingSet); BeforeCallDirect(m_RegWorkingSet);
MoveConstToX86reg((DWORD)_Audio,x86_ECX); MoveConstToX86reg((DWORD)g_Audio,x86_ECX);
Call_Direct(AddressOf(&CAudio::GetLength),"CAudio::GetLength"); Call_Direct(AddressOf(&CAudio::GetLength),"CAudio::GetLength");
MoveX86regToVariable(x86_EAX,&m_TempValue,"m_TempValue"); MoveX86regToVariable(x86_EAX,&m_TempValue,"m_TempValue");
AfterCallDirect(m_RegWorkingSet); AfterCallDirect(m_RegWorkingSet);
@ -478,7 +478,7 @@ void CMipsMemoryVM::Compile_LW (x86Reg Reg, DWORD VAddr ) {
if (bFixedAudio()) if (bFixedAudio())
{ {
BeforeCallDirect(m_RegWorkingSet); BeforeCallDirect(m_RegWorkingSet);
MoveConstToX86reg((DWORD)_Audio,x86_ECX); MoveConstToX86reg((DWORD)g_Audio,x86_ECX);
Call_Direct(AddressOf(&CAudio::GetStatus),"GetStatus"); Call_Direct(AddressOf(&CAudio::GetStatus),"GetStatus");
MoveX86regToVariable(x86_EAX,&m_TempValue,"m_TempValue"); MoveX86regToVariable(x86_EAX,&m_TempValue,"m_TempValue");
AfterCallDirect(m_RegWorkingSet); AfterCallDirect(m_RegWorkingSet);
@ -891,7 +891,7 @@ void CMipsMemoryVM::Compile_SW_Const ( DWORD Value, DWORD VAddr ) {
if (bFixedAudio()) if (bFixedAudio())
{ {
X86BreakPoint(__FILE__,__LINE__); X86BreakPoint(__FILE__,__LINE__);
MoveConstToX86reg((DWORD)_Audio,x86_ECX); MoveConstToX86reg((DWORD)g_Audio,x86_ECX);
Call_Direct(AddressOf(&CAudio::LenChanged),"LenChanged"); Call_Direct(AddressOf(&CAudio::LenChanged),"LenChanged");
} else { } else {
Call_Direct(g_Plugins->Audio()->LenChanged,"AiLenChanged"); Call_Direct(g_Plugins->Audio()->LenChanged,"AiLenChanged");
@ -1173,7 +1173,7 @@ void CMipsMemoryVM::Compile_SW_Register (x86Reg Reg, DWORD VAddr )
BeforeCallDirect(m_RegWorkingSet); BeforeCallDirect(m_RegWorkingSet);
if (bFixedAudio()) if (bFixedAudio())
{ {
MoveConstToX86reg((DWORD)_Audio,x86_ECX); MoveConstToX86reg((DWORD)g_Audio,x86_ECX);
Call_Direct(AddressOf(&CAudio::LenChanged),"LenChanged"); Call_Direct(AddressOf(&CAudio::LenChanged),"LenChanged");
} else { } else {
Call_Direct(g_Plugins->Audio()->LenChanged,"g_Plugins->Audio()->LenChanged"); Call_Direct(g_Plugins->Audio()->LenChanged,"g_Plugins->Audio()->LenChanged");
@ -1796,7 +1796,7 @@ int CMipsMemoryVM::LW_NonMemory ( DWORD PAddr, DWORD * Value ) {
case 0x04500004: case 0x04500004:
if (bFixedAudio()) if (bFixedAudio())
{ {
*Value = _Audio->GetLength(); *Value = g_Audio->GetLength();
} else { } else {
if (g_Plugins->Audio()->ReadLength != NULL) { if (g_Plugins->Audio()->ReadLength != NULL) {
*Value = g_Plugins->Audio()->ReadLength(); *Value = g_Plugins->Audio()->ReadLength();
@ -1808,7 +1808,7 @@ int CMipsMemoryVM::LW_NonMemory ( DWORD PAddr, DWORD * Value ) {
case 0x0450000C: case 0x0450000C:
if (bFixedAudio()) if (bFixedAudio())
{ {
*Value = _Audio->GetStatus(); *Value = g_Audio->GetStatus();
} else { } else {
*Value = g_Reg->AI_STATUS_REG; *Value = g_Reg->AI_STATUS_REG;
} }
@ -2245,7 +2245,7 @@ int CMipsMemoryVM::SW_NonMemory ( DWORD PAddr, DWORD Value ) {
g_Reg->AI_LEN_REG = Value; g_Reg->AI_LEN_REG = Value;
if (bFixedAudio()) if (bFixedAudio())
{ {
_Audio->LenChanged(); g_Audio->LenChanged();
} else { } else {
if (g_Plugins->Audio()->LenChanged != NULL) { g_Plugins->Audio()->LenChanged(); } if (g_Plugins->Audio()->LenChanged != NULL) { g_Plugins->Audio()->LenChanged(); }
} }
@ -2262,7 +2262,7 @@ int CMipsMemoryVM::SW_NonMemory ( DWORD PAddr, DWORD Value ) {
g_Plugins->Audio()->DacrateChanged(g_System->m_SystemType); g_Plugins->Audio()->DacrateChanged(g_System->m_SystemType);
if (bFixedAudio()) if (bFixedAudio())
{ {
_Audio->SetFrequency(Value,g_System->m_SystemType); g_Audio->SetFrequency(Value,g_System->m_SystemType);
} }
break; break;
case 0x04500014: g_Reg->AI_BITRATE_REG = Value; break; case 0x04500014: g_Reg->AI_BITRATE_REG = Value; break;

View File

@ -216,7 +216,7 @@ void CSystemTimer::TimerDone (void)
break; break;
case CSystemTimer::AiTimer: case CSystemTimer::AiTimer:
_SystemTimer->StopTimer(CSystemTimer::AiTimer); _SystemTimer->StopTimer(CSystemTimer::AiTimer);
_Audio->TimerDone(); g_Audio->TimerDone();
break; break;
default: default:
g_Notify->BreakPoint(__FILE__,__LINE__); g_Notify->BreakPoint(__FILE__,__LINE__);

View File

@ -530,7 +530,7 @@ bool CN64System::SetActiveSystem( bool bActive )
g_MMU = &m_MMU_VM; g_MMU = &m_MMU_VM;
g_TLB = &m_TLB; g_TLB = &m_TLB;
g_Reg = &m_Reg; g_Reg = &m_Reg;
_Audio = &m_Audio; g_Audio = &m_Audio;
//_Labels = NULL; //??? //_Labels = NULL; //???
_SystemTimer = &m_SystemTimer; _SystemTimer = &m_SystemTimer;
_TransVaddr = &m_MMU_VM; _TransVaddr = &m_MMU_VM;
@ -562,7 +562,7 @@ bool CN64System::SetActiveSystem( bool bActive )
g_MMU = NULL; g_MMU = NULL;
g_TLB = NULL; g_TLB = NULL;
g_Reg = NULL; g_Reg = NULL;
_Audio = NULL; g_Audio = NULL;
_Labels = NULL; _Labels = NULL;
_SystemTimer = NULL; _SystemTimer = NULL;
_TransVaddr = NULL; _TransVaddr = NULL;
@ -1619,7 +1619,7 @@ void CN64System::SyncToAudio ( void ) {
// { // {
// return; // return;
// } // }
if (_Audio->GetLength() == 0) if (g_Audio->GetLength() == 0)
{ {
return; return;
} }
@ -1669,7 +1669,7 @@ void CN64System::RefreshScreen ( void ) {
_SystemTimer->SetTimer(CSystemTimer::ViTimer,VI_INTR_TIME,true); _SystemTimer->SetTimer(CSystemTimer::ViTimer,VI_INTR_TIME,true);
if (bFixedAudio()) if (bFixedAudio())
{ {
_Audio->SetViIntr (VI_INTR_TIME); g_Audio->SetViIntr (VI_INTR_TIME);
} }
if (g_Plugins->Control()->GetKeys) if (g_Plugins->Control()->GetKeys)
{ {

View File

@ -10,7 +10,7 @@ CRegisters * g_Reg = NULL; //Current Register Set attacted to the g_MMU
CNotification * g_Notify = NULL; CNotification * g_Notify = NULL;
CPlugins * g_Plugins = NULL; CPlugins * g_Plugins = NULL;
CN64Rom * g_Rom = NULL; //The current rom that this system is executing.. it can only execute one file at the time CN64Rom * g_Rom = NULL; //The current rom that this system is executing.. it can only execute one file at the time
CAudio * _Audio = NULL; CAudio * g_Audio = NULL;
CMemoryLabel * _Labels = NULL; CMemoryLabel * _Labels = NULL;
CSystemTimer * _SystemTimer = NULL; CSystemTimer * _SystemTimer = NULL;
CTransVaddr * _TransVaddr = NULL; CTransVaddr * _TransVaddr = NULL;

View File

@ -10,7 +10,7 @@ extern CTLB * g_TLB; //TLB Unit
extern CRegisters * g_Reg; //Current Register Set attached to the g_MMU extern CRegisters * g_Reg; //Current Register Set attached to the g_MMU
extern CPlugins * g_Plugins; extern CPlugins * g_Plugins;
extern CN64Rom * g_Rom; //The current rom that this system is executing.. it can only execute one file at the time extern CN64Rom * g_Rom; //The current rom that this system is executing.. it can only execute one file at the time
extern CAudio * _Audio; extern CAudio * g_Audio;
extern CMemoryLabel * _Labels; extern CMemoryLabel * _Labels;
extern CSystemTimer * _SystemTimer; extern CSystemTimer * _SystemTimer;
extern CTransVaddr * _TransVaddr; extern CTransVaddr * _TransVaddr;