summaryrefslogtreecommitdiffstats
path: root/src/audio/sampman_miles.cpp
diff options
context:
space:
mode:
authorSergeanur <s.anureev@yandex.ua>2021-07-28 08:39:57 +0200
committerSergeanur <s.anureev@yandex.ua>2021-07-28 08:39:57 +0200
commit8960ffaf0ba8976f17110401879f943d69d0506d (patch)
tree048591db01264348622577f36f4fb0cca5efd6c4 /src/audio/sampman_miles.cpp
parentPed comments ordering and type fix + vice function(s) fix (diff)
downloadre3-8960ffaf0ba8976f17110401879f943d69d0506d.tar
re3-8960ffaf0ba8976f17110401879f943d69d0506d.tar.gz
re3-8960ffaf0ba8976f17110401879f943d69d0506d.tar.bz2
re3-8960ffaf0ba8976f17110401879f943d69d0506d.tar.lz
re3-8960ffaf0ba8976f17110401879f943d69d0506d.tar.xz
re3-8960ffaf0ba8976f17110401879f943d69d0506d.tar.zst
re3-8960ffaf0ba8976f17110401879f943d69d0506d.zip
Diffstat (limited to 'src/audio/sampman_miles.cpp')
-rw-r--r--src/audio/sampman_miles.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp
index b77584d0..f94768cb 100644
--- a/src/audio/sampman_miles.cpp
+++ b/src/audio/sampman_miles.cpp
@@ -1322,7 +1322,7 @@ cSampleManager::Initialise(void)
int32 randval;
if ( bUseRandomTable )
- randval = AudioManager.GetRandomNumber(1);
+ randval = AudioManager.m_anRandomTable[1];
else
randval = localtm->tm_sec * localtm->tm_min;
@@ -1333,7 +1333,7 @@ cSampleManager::Initialise(void)
randmp3 = randmp3->pNext;
if ( bUseRandomTable )
- _CurMP3Pos = AudioManager.GetRandomNumber(0) % randmp3->nTrackLength;
+ _CurMP3Pos = AudioManager.m_anRandomTable[0] % randmp3->nTrackLength;
else
{
if ( localtm->tm_sec > 0 )
@@ -1342,7 +1342,7 @@ cSampleManager::Initialise(void)
_CurMP3Pos = s*s*s*s*s*s*s*s % randmp3->nTrackLength;
}
else
- _CurMP3Pos = AudioManager.GetRandomNumber(0) % randmp3->nTrackLength;
+ _CurMP3Pos = AudioManager.m_anRandomTable[0] % randmp3->nTrackLength;
}
}
else
@@ -1671,7 +1671,7 @@ cSampleManager::UpdateReverb(void)
if ( !usingEAX )
return FALSE;
- if ( AudioManager.GetFrameCounter() & 15 )
+ if ( AudioManager.m_FrameCounter & 15 )
return FALSE;
float fRatio = 0.0f;
@@ -1679,13 +1679,13 @@ cSampleManager::UpdateReverb(void)
#define MIN_DIST 0.5f
#define CALCULATE_RATIO(value, maxDist, maxRatio) (value > MIN_DIST && value < maxDist ? value / maxDist * maxRatio : 0)
- fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_NORTH), 10.0f, 1/2.f);
- fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_SOUTH), 10.0f, 1/2.f);
- fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_WEST), 10.0f, 1/2.f);
- fRatio += CALCULATE_RATIO(AudioManager.GetReflectionsDistance(REFLECTION_CEIL_EAST), 10.0f, 1/2.f);
+ fRatio += CALCULATE_RATIO(AudioManager.m_afReflectionsDistances[REFLECTION_CEIL_NORTH], 10.0f, 1/2.f);
+ fRatio += CALCULATE_RATIO(AudioManager.m_afReflectionsDistances[REFLECTION_CEIL_SOUTH], 10.0f, 1/2.f);
+ fRatio += CALCULATE_RATIO(AudioManager.m_afReflectionsDistances[REFLECTION_CEIL_WEST], 10.0f, 1/2.f);
+ fRatio += CALCULATE_RATIO(AudioManager.m_afReflectionsDistances[REFLECTION_CEIL_EAST], 10.0f, 1/2.f);
- fRatio += CALCULATE_RATIO((AudioManager.GetReflectionsDistance(REFLECTION_NORTH) + AudioManager.GetReflectionsDistance(REFLECTION_SOUTH)) / 2.f, 4.0f, 1/3.f);
- fRatio += CALCULATE_RATIO((AudioManager.GetReflectionsDistance(REFLECTION_WEST) + AudioManager.GetReflectionsDistance(REFLECTION_EAST)) / 2.f, 4.0f, 1/3.f);
+ fRatio += CALCULATE_RATIO((AudioManager.m_afReflectionsDistances[REFLECTION_NORTH] + AudioManager.m_afReflectionsDistances[REFLECTION_SOUTH]) / 2.f, 4.0f, 1/3.f);
+ fRatio += CALCULATE_RATIO((AudioManager.m_afReflectionsDistances[REFLECTION_WEST] + AudioManager.m_afReflectionsDistances[REFLECTION_EAST]) / 2.f, 4.0f, 1/3.f);
#undef CALCULATE_RATIO
#undef MIN_DIST