mirror of
https://github.com/smartcmd/MinecraftConsoles.git
synced 2026-08-20 09:57:09 +00:00
Merge branch 'main' of https://github.com/smartcmd/MinecraftConsoles
This commit is contained in:
commit
544156f92c
|
|
@ -260,7 +260,7 @@ void SoundEngine::updateMiniAudio()
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
float finalVolume = s->info.volume;
|
float finalVolume = s->info.volume * m_MasterEffectsVolume;
|
||||||
if (finalVolume > 1.0f)
|
if (finalVolume > 1.0f)
|
||||||
finalVolume = 1.0f;
|
finalVolume = 1.0f;
|
||||||
|
|
||||||
|
|
@ -967,14 +967,8 @@ void SoundEngine::playMusicTick()
|
||||||
// AP - moved to a separate function so it can be called from the mixer callback on Vita
|
// AP - moved to a separate function so it can be called from the mixer callback on Vita
|
||||||
void SoundEngine::playMusicUpdate()
|
void SoundEngine::playMusicUpdate()
|
||||||
{
|
{
|
||||||
//return;
|
|
||||||
static bool firstCall = true;
|
|
||||||
static float fMusicVol = 0.0f;
|
static float fMusicVol = 0.0f;
|
||||||
if( firstCall )
|
|
||||||
{
|
|
||||||
fMusicVol = getMasterMusicVolume();
|
fMusicVol = getMasterMusicVolume();
|
||||||
firstCall = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch(m_StreamState)
|
switch(m_StreamState)
|
||||||
{
|
{
|
||||||
|
|
@ -1242,7 +1236,7 @@ void SoundEngine::playMusicUpdate()
|
||||||
|
|
||||||
ma_sound_set_pitch(&m_musicStream, m_StreamingAudioInfo.pitch);
|
ma_sound_set_pitch(&m_musicStream, m_StreamingAudioInfo.pitch);
|
||||||
|
|
||||||
float finalVolume = m_StreamingAudioInfo.volume * m_MasterMusicVolume;
|
float finalVolume = m_StreamingAudioInfo.volume * getMasterMusicVolume();
|
||||||
|
|
||||||
ma_sound_set_volume(&m_musicStream, finalVolume);
|
ma_sound_set_volume(&m_musicStream, finalVolume);
|
||||||
ma_result startResult = ma_sound_start(&m_musicStream);
|
ma_result startResult = ma_sound_start(&m_musicStream);
|
||||||
|
|
@ -1370,8 +1364,6 @@ void SoundEngine::playMusicUpdate()
|
||||||
}
|
}
|
||||||
|
|
||||||
// volume change required?
|
// volume change required?
|
||||||
if (fMusicVol != getMasterMusicVolume())
|
|
||||||
{
|
|
||||||
if (m_musicStreamActive)
|
if (m_musicStreamActive)
|
||||||
{
|
{
|
||||||
float finalVolume = m_StreamingAudioInfo.volume * fMusicVol;
|
float finalVolume = m_StreamingAudioInfo.volume * fMusicVol;
|
||||||
|
|
@ -1380,7 +1372,6 @@ void SoundEngine::playMusicUpdate()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Music disc playing - if it's a 3D stream, then set the position - we don't have any streaming audio in the world that moves, so this isn't
|
// Music disc playing - if it's a 3D stream, then set the position - we don't have any streaming audio in the world that moves, so this isn't
|
||||||
|
|
|
||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in a new issue