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;
|
||||
}
|
||||
|
||||
float finalVolume = s->info.volume;
|
||||
float finalVolume = s->info.volume * m_MasterEffectsVolume;
|
||||
if (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
|
||||
void SoundEngine::playMusicUpdate()
|
||||
{
|
||||
//return;
|
||||
static bool firstCall = true;
|
||||
static float fMusicVol = 0.0f;
|
||||
if( firstCall )
|
||||
{
|
||||
fMusicVol = getMasterMusicVolume();
|
||||
firstCall = false;
|
||||
}
|
||||
fMusicVol = getMasterMusicVolume();
|
||||
|
||||
switch(m_StreamState)
|
||||
{
|
||||
|
|
@ -1242,7 +1236,7 @@ void SoundEngine::playMusicUpdate()
|
|||
|
||||
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_result startResult = ma_sound_start(&m_musicStream);
|
||||
|
|
@ -1370,14 +1364,11 @@ void SoundEngine::playMusicUpdate()
|
|||
}
|
||||
|
||||
// volume change required?
|
||||
if (fMusicVol != getMasterMusicVolume())
|
||||
if (m_musicStreamActive)
|
||||
{
|
||||
if (m_musicStreamActive)
|
||||
{
|
||||
float finalVolume = m_StreamingAudioInfo.volume * fMusicVol;
|
||||
float finalVolume = m_StreamingAudioInfo.volume * fMusicVol;
|
||||
|
||||
ma_sound_set_volume(&m_musicStream, finalVolume);
|
||||
}
|
||||
ma_sound_set_volume(&m_musicStream, finalVolume);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
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