diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-06-12 19:19:31 +0300 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 21:32:44 +0300 |
commit | 939d0c59a3994a564b2257b8d9e5ec107b1b7933 (patch) | |
tree | c765f6d491ead937dd7741133cf390aba380ced9 /src/audio/AudioCollision.cpp | |
parent | edc25a689fed2bb08d6b6af4b67e9f84c460c5dc (diff) |
Add macros to set sample loop offsets
Diffstat (limited to 'src/audio/AudioCollision.cpp')
-rw-r--r-- | src/audio/AudioCollision.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/src/audio/AudioCollision.cpp b/src/audio/AudioCollision.cpp index 0f96cec4..fd819641 100644 --- a/src/audio/AudioCollision.cpp +++ b/src/audio/AudioCollision.cpp @@ -170,10 +170,7 @@ cAudioManager::SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 coun m_sQueueSample.m_nReleasingVolumeModificator = 7; m_sQueueSample.m_nLoopCount = 0; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = - SampleManager.GetSampleLoopStartOffset(m_sQueueSample.m_nSampleIndex); - m_sQueueSample.m_nLoopEnd = - SampleManager.GetSampleLoopEndOffset(m_sQueueSample.m_nSampleIndex); + SET_LOOP_OFFSETS(m_sQueueSample.m_nSampleIndex); m_sQueueSample.m_fSpeedMultiplier = 4.0f; m_sQueueSample.m_fSoundIntensity = CollisionSoundIntensity; m_sQueueSample.m_bReleasingSoundFlag = FALSE; @@ -311,8 +308,7 @@ cAudioManager::SetUpOneShotCollisionSound(const cAudioCollision &col) m_sQueueSample.m_nReleasingVolumeModificator = 11; m_sQueueSample.m_nLoopCount = 1; m_sQueueSample.m_nEmittingVolume = emittingVol; - m_sQueueSample.m_nLoopStart = 0; - m_sQueueSample.m_nLoopEnd = -1; + RESET_LOOP_OFFSETS m_sQueueSample.m_fSpeedMultiplier = 4.0f; m_sQueueSample.m_fSoundIntensity = CollisionSoundIntensity; m_sQueueSample.m_bReleasingSoundFlag = TRUE; |