summaryrefslogtreecommitdiff
path: root/src/audio/MusicManager.cpp
diff options
context:
space:
mode:
authorFilip Gawin <filip.gawin@zoho.com>2020-03-21 14:51:30 +0100
committerFilip Gawin <filip.gawin@zoho.com>2020-03-22 17:30:54 +0100
commita097f225bcc4782820f76cc79b2c9121daae109b (patch)
tree4a599984a9b67565f3345054760426af155ec038 /src/audio/MusicManager.cpp
parent337924c7944115a9212edfb1097a8f83e7f6daf0 (diff)
Fixes for review
Diffstat (limited to 'src/audio/MusicManager.cpp')
-rw-r--r--src/audio/MusicManager.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/audio/MusicManager.cpp b/src/audio/MusicManager.cpp
index 5b94514b..c1da6881 100644
--- a/src/audio/MusicManager.cpp
+++ b/src/audio/MusicManager.cpp
@@ -21,6 +21,8 @@ uint8 &cDisplay = *(uint8 *)0x650BA1;
int32 &gRetuneCounter = *(int32*)0x650B84;
bool& bHasStarted = *(bool*)0x650B7C;
+constexpr int maxVolume = 127;
+
cMusicManager::cMusicManager()
{
m_bIsInitialised = false;
@@ -365,7 +367,7 @@ cMusicManager::Service()
if (!m_bIsInitialised || m_bDisabled) return;
if (m_nMusicMode == MUSICMODE_CUTSCENE) {
- SampleManager.SetStreamedVolumeAndPan(AudioManager.maxVolume, 63, 1, 0);
+ SampleManager.SetStreamedVolumeAndPan(maxVolume, 63, 1, 0);
return;
}
@@ -666,7 +668,7 @@ cMusicManager::PreloadCutSceneMusic(uint8 track)
while (SampleManager.IsStreamPlaying(0))
SampleManager.StopStreamedFile(0);
SampleManager.PreloadStreamedFile(track, 0);
- SampleManager.SetStreamedVolumeAndPan(AudioManager.maxVolume, 63, 1, 0);
+ SampleManager.SetStreamedVolumeAndPan(maxVolume, 63, 1, 0);
m_nCurrentStreamedSound = track;
}
}