Merge pull request #1187 from lioncash/global

AudioCommon: Prefix soundStream global with g_
This commit is contained in:
skidau committed 2014-10-01 13:23:11 +10:00
commit ffe160ad81
6 files changed
+43 -43

No files matched your search

+2 -2
View File
@@ -690,9 +690,9 @@ void UpdateTitle()
std::string SMessage = StringFromFormat("%s | %s", SSettings.c_str(), SFPS.c_str());
// Update the audio timestretcher with the current speed
if (soundStream)
if (g_sound_stream)
{
CMixer* pMixer = soundStream->GetMixer();
CMixer* pMixer = g_sound_stream->GetMixer();
pMixer->UpdateSpeed((float)Speed / 100);
}
+3 -3
View File
@@ -197,7 +197,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
DEBUG_LOG(AUDIO_INTERFACE, "Change AISFR to %s", tmpAICtrl.AISFR ? "48khz":"32khz");
m_Control.AISFR = tmpAICtrl.AISFR;
g_AISSampleRate = tmpAICtrl.AISFR ? 48000 : 32000;
soundStream->GetMixer()->SetStreamInputSampleRate(g_AISSampleRate);
g_sound_stream->GetMixer()->SetStreamInputSampleRate(g_AISSampleRate);
g_CPUCyclesPerSample = SystemTimers::GetTicksPerSecond() / g_AISSampleRate;
}
// Set frequency of DMA
@@ -206,7 +206,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
DEBUG_LOG(AUDIO_INTERFACE, "Change AIDFR to %s", tmpAICtrl.AIDFR ? "32khz":"48khz");
m_Control.AIDFR = tmpAICtrl.AIDFR;
g_AIDSampleRate = tmpAICtrl.AIDFR ? 32000 : 48000;
soundStream->GetMixer()->SetDMAInputSampleRate(g_AIDSampleRate);
g_sound_stream->GetMixer()->SetDMAInputSampleRate(g_AIDSampleRate);
}
@@ -245,7 +245,7 @@ void RegisterMMIO(MMIO::Mapping* mmio, u32 base)
MMIO::DirectRead<u32>(&m_Volume.hex),
MMIO::ComplexWrite<u32>([](u32, u32 val) {
m_Volume.hex = val;
soundStream->GetMixer()->SetStreamingVolume(m_Volume.left, m_Volume.right);
g_sound_stream->GetMixer()->SetStreamingVolume(m_Volume.left, m_Volume.right);
})
);
+1 -1
View File
@@ -320,7 +320,7 @@ static void DTKStreamingCallback(u64 userdata, int cyclesLate)
memset(tempPCM, 0, sizeof(tempPCM));
samples_processed = NUM_SAMPLES;
}
soundStream->GetMixer()->PushStreamingSamples(tempPCM, samples_processed);
g_sound_stream->GetMixer()->PushStreamingSamples(tempPCM, samples_processed);
int ticks_to_dtk = int(SystemTimers::GetTicksPerSecond() * u64(samples_processed) / 48000);
CoreTiming::ScheduleEvent(ticks_to_dtk - cyclesLate, dtk);
+4 -4
View File
@@ -81,9 +81,9 @@ void Wiimote::SpeakerData(wm_speaker_data* sd)
// Speaker Pan
unsigned int vol = (unsigned int)(m_options->settings[4]->GetValue() * 100);
soundStream->GetMixer()->SetWiimoteSpeakerVolume(128 + vol, 128 - vol);
g_sound_stream->GetMixer()->SetWiimoteSpeakerVolume(128 + vol, 128 - vol);
soundStream->GetMixer()->PushWiimoteSpeakerSamples(samples, sd->length, 1500);
g_sound_stream->GetMixer()->PushWiimoteSpeakerSamples(samples, sd->length, 1500);
}
else if (m_reg_speaker.format == 0x00)
{
@@ -96,9 +96,9 @@ void Wiimote::SpeakerData(wm_speaker_data* sd)
// Speaker Pan
unsigned int vol = (unsigned int)(m_options->settings[4]->GetValue() * 100);
soundStream->GetMixer()->SetWiimoteSpeakerVolume(128 + vol, 128 - vol);
g_sound_stream->GetMixer()->SetWiimoteSpeakerVolume(128 + vol, 128 - vol);
soundStream->GetMixer()->PushWiimoteSpeakerSamples(samples, sd->length, 3000);
g_sound_stream->GetMixer()->PushWiimoteSpeakerSamples(samples, sd->length, 3000);
}
#ifdef WIIMOTE_SPEAKER_DUMP