diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-31 19:59:01 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-05-31 19:59:01 +0200 |
commit | c1c163d78c7f822b62aa6b0f5c7b00642b961700 (patch) | |
tree | 7a586e9878b6725e52f92e0efbc6576828b18696 /src/audio/sampman_oal.cpp | |
parent | better name (diff) | |
download | re3-c1c163d78c7f822b62aa6b0f5c7b00642b961700.tar re3-c1c163d78c7f822b62aa6b0f5c7b00642b961700.tar.gz re3-c1c163d78c7f822b62aa6b0f5c7b00642b961700.tar.bz2 re3-c1c163d78c7f822b62aa6b0f5c7b00642b961700.tar.lz re3-c1c163d78c7f822b62aa6b0f5c7b00642b961700.tar.xz re3-c1c163d78c7f822b62aa6b0f5c7b00642b961700.tar.zst re3-c1c163d78c7f822b62aa6b0f5c7b00642b961700.zip |
Diffstat (limited to '')
-rw-r--r-- | src/audio/sampman_oal.cpp | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/audio/sampman_oal.cpp b/src/audio/sampman_oal.cpp index 5092a4b1..210d128e 100644 --- a/src/audio/sampman_oal.cpp +++ b/src/audio/sampman_oal.cpp @@ -1168,7 +1168,7 @@ cSampleManager::StopChannel(uint32 nChannel) } void -cSampleManager::PreloadStreamedFile(uint8 nFile, uint8 nStream) +cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream) { char filename[256]; @@ -1226,7 +1226,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream) } bool -cSampleManager::StartStreamedFile(uint8 nFile, uint32 nPos, uint8 nStream) +cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream) { char filename[256]; @@ -1317,8 +1317,12 @@ cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffect if ( stream ) { - if ( nEffectFlag ) - stream->SetVolume(m_nEffectsFadeVolume*nVolume*m_nEffectsVolume >> 14); + if ( nEffectFlag ) { + if ( nStream == 1 ) // TODO(MIAMI): || nStream == 2 when we have second mission channel? + stream->SetVolume(64*vol*m_nEffectsVolume >> 14) + else + stream->SetVolume(m_nEffectsFadeVolume*nVolume*m_nEffectsVolume >> 14); + } else stream->SetVolume(m_nMusicFadeVolume*nVolume*m_nMusicVolume >> 14); |