summaryrefslogtreecommitdiffstats
path: root/src/audio/sampman_miles.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/audio/sampman_miles.cpp')
-rw-r--r--src/audio/sampman_miles.cpp282
1 files changed, 141 insertions, 141 deletions
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp
index 1be56441..85b00f44 100644
--- a/src/audio/sampman_miles.cpp
+++ b/src/audio/sampman_miles.cpp
@@ -28,7 +28,7 @@ char SampleBankDataFilename[] = "AUDIO\\SFX.RAW";
FILE *fpSampleDescHandle;
FILE *fpSampleDataHandle;
-bool bSampleBankLoaded [MAX_SFX_BANKS];
+bool8 bSampleBankLoaded [MAX_SFX_BANKS];
int32 nSampleBankDiscStartOffset [MAX_SFX_BANKS];
int32 nSampleBankSize [MAX_SFX_BANKS];
int32 nSampleBankMemoryStartAddress[MAX_SFX_BANKS];
@@ -63,11 +63,11 @@ int8 nStreamVolume[MAX_STREAMS];
uint8 nStreamLoopedFlag[MAX_STREAMS];
uint32 _CurMP3Index;
int32 _CurMP3Pos;
-bool _bIsMp3Active;
+bool8 _bIsMp3Active;
///////////////////////////////////////////////////////////////
-bool _bSampmanInitialised = false;
+bool8 _bSampmanInitialised = FALSE;
//
// Miscellaneous globals / defines
@@ -94,7 +94,7 @@ S32 speaker_type=0;
U32 _maxSamples;
float _fPrevEaxRatioDestination;
-bool _usingMilesFast2D;
+bool8 _usingMilesFast2D;
float _fEffectsLevel;
@@ -166,17 +166,17 @@ release_existing()
}
_fPrevEaxRatioDestination = 0.0f;
- _usingMilesFast2D = false;
+ _usingMilesFast2D = FALSE;
_fEffectsLevel = 0.0f;
}
-static bool
+static bool8
set_new_provider(S32 index)
{
DWORD result;
if ( curprovider == index )
- return true;
+ return TRUE;
//close the already opened provider
curprovider = index;
@@ -203,7 +203,7 @@ set_new_provider(S32 index)
release_existing();
- return false;
+ return FALSE;
}
else
{
@@ -234,7 +234,7 @@ set_new_provider(S32 index)
AIL_set_3D_room_type(opened_provider, ENVIRONMENT_CAVE);
if ( !strcmp(providers[index].name, "Miles Fast 2D Positional Audio") )
- _usingMilesFast2D = true;
+ _usingMilesFast2D = TRUE;
}
AIL_3D_provider_attribute(opened_provider, "Maximum supported samples", &_maxSamples);
@@ -252,11 +252,11 @@ set_new_provider(S32 index)
AIL_set_3D_sample_effects_level(opened_samples[i], 0.0f);
}
- return true;
+ return TRUE;
}
}
- return false;
+ return FALSE;
}
U32 RadioHandlers[9];
@@ -533,7 +533,7 @@ cSampleManager::AutoDetect3DProviders()
return -1;
}
-static bool
+static bool8
_ResolveLink(char const *path, char *out)
{
IShellLink* psl;
@@ -569,7 +569,7 @@ _ResolveLink(char const *path, char *out)
ppf->Release();
psl->Release();
#endif
- return true;
+ return TRUE;
}
}
}
@@ -579,15 +579,15 @@ _ResolveLink(char const *path, char *out)
psl->Release();
}
- return false;
+ return FALSE;
}
static void
_FindMP3s(void)
{
tMP3Entry *pList;
- bool bShortcut;
- bool bInitFirstEntry;
+ bool8 bShortcut;
+ bool8 bInitFirstEntry;
HANDLE hFind;
char path[MAX_PATH];
char filepath[MAX_PATH*2];
@@ -639,10 +639,10 @@ _FindMP3s(void)
OutputDebugString(filepath);
}
- bShortcut = true;
+ bShortcut = TRUE;
}
else
- bShortcut = false;
+ bShortcut = FALSE;
}
mp3Stream[0] = AIL_open_stream(DIG, filepath, 0);
@@ -682,7 +682,7 @@ _FindMP3s(void)
{
_pMP3List->pLinkPath = NULL;
}
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -690,10 +690,10 @@ _FindMP3s(void)
OutputDebugString(filepath);
- bInitFirstEntry = true;
+ bInitFirstEntry = TRUE;
}
- while ( true )
+ while ( TRUE )
{
if ( !FindNextFile(hFind, &fd) )
break;
@@ -717,11 +717,11 @@ _FindMP3s(void)
OutputDebugString(filepath);
}
- bShortcut = true;
+ bShortcut = TRUE;
}
else
{
- bShortcut = false;
+ bShortcut = FALSE;
if ( filepathlen > MAX_PATH )
{
@@ -764,7 +764,7 @@ _FindMP3s(void)
pList = _pMP3List;
- bInitFirstEntry = false;
+ bInitFirstEntry = FALSE;
}
else
{
@@ -792,11 +792,11 @@ _FindMP3s(void)
OutputDebugString(filepath);
}
- bShortcut = true;
+ bShortcut = TRUE;
}
else
{
- bShortcut = false;
+ bShortcut = FALSE;
}
}
@@ -908,7 +908,7 @@ _GetMP3EntryByIndex(uint32 idx)
return NULL;
}
-static inline bool
+static inline bool8
_GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
{
_CurMP3Index = 0;
@@ -921,7 +921,7 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
*pPosition -= (*pEntry)->nTrackStreamPos;
_CurMP3Pos = *pPosition;
- return true;
+ return TRUE;
}
_CurMP3Index++;
@@ -932,10 +932,10 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry)
_CurMP3Pos = 0;
_CurMP3Index = 0;
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::IsMP3RadioChannelAvailable(void)
{
return nNumMP3s != 0;
@@ -964,13 +964,13 @@ cSampleManager::ReacquireDigitalHandle(void)
}
}
-bool
+bool8
cSampleManager::Initialise(void)
{
TRACE("start");
if ( _bSampmanInitialised )
- return true;
+ return TRUE;
{
for ( int32 i = 0; i < TOTAL_AUDIO_SAMPLES; i++ )
@@ -996,7 +996,7 @@ cSampleManager::Initialise(void)
curprovider = -1;
prevprovider = -1;
- _usingMilesFast2D = false;
+ _usingMilesFast2D = FALSE;
usingEAX=0;
usingEAX3=0;
@@ -1021,7 +1021,7 @@ cSampleManager::Initialise(void)
for ( int32 i = 0; i < MAX_SFX_BANKS; i++ )
{
- bSampleBankLoaded[i] = false;
+ bSampleBankLoaded[i] = FALSE;
nSampleBankDiscStartOffset[i] = 0;
nSampleBankSize[i] = 0;
nSampleBankMemoryStartAddress[i] = 0;
@@ -1062,24 +1062,24 @@ cSampleManager::Initialise(void)
#ifdef AUDIO_CACHE
TRACE("cache");
FILE *cacheFile = fcaseopen("audio\\sound.cache", "rb");
- bool CreateCache = false;
+ bool8 CreateCache = FALSE;
if (cacheFile) {
fread(nStreamLength, sizeof(uint32), TOTAL_STREAMED_SOUNDS, cacheFile);
fclose(cacheFile);
}else
- CreateCache = true;
+ CreateCache = TRUE;
#endif
char filepath[MAX_PATH];
- bool bFileNotFound;
+ bool8 bFileNotFound;
S32 tatalms;
TRACE("cdrom");
{
- m_bInitialised = false;
+ m_bInitialised = FALSE;
- while (true)
+ while (TRUE)
{
// Find path of WAVs (originally in HDD)
@@ -1129,7 +1129,7 @@ cSampleManager::Initialise(void)
{
OutputDebugString(AIL_last_error());
Terminate();
- return false;
+ return FALSE;
}
add_providers();
@@ -1159,9 +1159,9 @@ cSampleManager::Initialise(void)
}
else
{
- m_bInitialised = false;
+ m_bInitialised = FALSE;
Terminate();
- return false;
+ return FALSE;
}
}
*/
@@ -1204,7 +1204,7 @@ cSampleManager::Initialise(void)
AIL_close_stream(mp3Stream[0]);
mp3Stream[0] = NULL;
- bFileNotFound = false;
+ bFileNotFound = FALSE;
#ifdef AUDIO_CACHE
if (!CreateCache)
break;
@@ -1215,7 +1215,7 @@ cSampleManager::Initialise(void)
}
else
{
- bFileNotFound = true;
+ bFileNotFound = TRUE;
break;
}
}
@@ -1250,11 +1250,11 @@ cSampleManager::Initialise(void)
mp3Stream[0] = NULL;
nStreamLength[i] = tatalms;
- bFileNotFound = false;
+ bFileNotFound = FALSE;
}
else
{
- bFileNotFound = true;
+ bFileNotFound = TRUE;
break;
}
}*/
@@ -1269,11 +1269,11 @@ cSampleManager::Initialise(void)
if ( FrontEndMenuManager.m_bQuitGameNoCD )
{
Terminate();
- return false;
+ return FALSE;
}
continue;
#else
- m_bInitialised = true;
+ m_bInitialised = TRUE;
#endif
}
@@ -1292,14 +1292,14 @@ cSampleManager::Initialise(void)
if ( !InitialiseSampleBanks() )
{
Terminate();
- return false;
+ return FALSE;
}
nSampleBankMemoryStartAddress[SFX_BANK_0] = (int32)AIL_mem_alloc_lock(nSampleBankSize[SFX_BANK_0]);
if ( !nSampleBankMemoryStartAddress[SFX_BANK_0] )
{
Terminate();
- return false;
+ return FALSE;
}
nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] = (int32)AIL_mem_alloc_lock(PED_BLOCKSIZE*MAX_PEDSFX);
@@ -1328,7 +1328,7 @@ cSampleManager::Initialise(void)
TRACE("providerset");
{
- _bSampmanInitialised = true;
+ _bSampmanInitialised = TRUE;
U32 n = 0;
@@ -1345,7 +1345,7 @@ cSampleManager::Initialise(void)
if ( n == m_nNumberOfProviders )
{
Terminate();
- return false;
+ return FALSE;
}
}
@@ -1370,13 +1370,13 @@ cSampleManager::Initialise(void)
time_t t = time(NULL);
tm *localtm;
- bool bUseRandomTable;
+ bool8 bUseRandomTable;
if ( t == -1 )
- bUseRandomTable = true;
+ bUseRandomTable = TRUE;
else
{
- bUseRandomTable = false;
+ bUseRandomTable = FALSE;
localtm = localtime(&t);
}
@@ -1408,12 +1408,12 @@ cSampleManager::Initialise(void)
else
_CurMP3Pos = 0;
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
TRACE("end");
- return true;
+ return TRUE;
}
void
@@ -1462,10 +1462,10 @@ cSampleManager::Terminate(void)
AIL_shutdown();
- _bSampmanInitialised = false;
+ _bSampmanInitialised = FALSE;
}
-bool
+bool8
cSampleManager::CheckForAnAudioFileOnCD(void)
{
#if !defined(NO_CDCHECK) // TODO: check steam, probably GTAVC_STEAM_PATCH needs to be added
@@ -1483,17 +1483,17 @@ cSampleManager::CheckForAnAudioFileOnCD(void)
DMAudio.SetEffectsMasterVolume(FrontEndMenuManager.m_PrefsSfxVolume);
DMAudio.Service();
- return true;
+ return TRUE;
}
DMAudio.SetMusicMasterVolume(0);
DMAudio.SetEffectsMasterVolume(0);
DMAudio.Service();
- return false;
+ return FALSE;
#else
- return true;
+ return TRUE;
#endif // #if !defined(NO_CDCHECK)
}
@@ -1575,48 +1575,48 @@ cSampleManager::SetMusicFadeVolume(uint8 nVolume)
}
void
-cSampleManager::SetMonoMode(uint8 nMode)
+cSampleManager::SetMonoMode(bool8 nMode)
{
m_nMonoMode = nMode;
}
-bool
+bool8
cSampleManager::LoadSampleBank(uint8 nBank)
{
if ( CTimer::GetIsCodePaused() )
- return false;
+ return FALSE;
if ( MusicManager.IsInitialised()
&& MusicManager.GetMusicMode() == MUSICMODE_CUTSCENE
&& nBank != SFX_BANK_0 )
{
- return false;
+ return FALSE;
}
if ( fseek(fpSampleDataHandle, nSampleBankDiscStartOffset[nBank], SEEK_SET) != 0 )
- return false;
+ return FALSE;
if ( fread((void *)nSampleBankMemoryStartAddress[nBank], 1, nSampleBankSize[nBank],fpSampleDataHandle) != nSampleBankSize[nBank] )
- return false;
+ return FALSE;
- bSampleBankLoaded[nBank] = true;
+ bSampleBankLoaded[nBank] = TRUE;
- return true;
+ return TRUE;
}
void
cSampleManager::UnloadSampleBank(uint8 nBank)
{
- bSampleBankLoaded[nBank] = false;
+ bSampleBankLoaded[nBank] = FALSE;
}
-bool
+bool8
cSampleManager::IsSampleBankLoaded(uint8 nBank)
{
return bSampleBankLoaded[nBank];
}
-bool
+bool8
cSampleManager::IsPedCommentLoaded(uint32 nComment)
{
int8 slot;
@@ -1629,10 +1629,10 @@ cSampleManager::IsPedCommentLoaded(uint32 nComment)
slot += ARRAY_SIZE(nPedSlotSfx);
#endif
if ( nComment == nPedSlotSfx[slot] )
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
int32
@@ -1654,11 +1654,11 @@ cSampleManager::_GetPedCommentSlot(uint32 nComment)
return -1;
}
-bool
+bool8
cSampleManager::LoadPedComment(uint32 nComment)
{
if ( CTimer::GetIsCodePaused() )
- return false;
+ return FALSE;
// no talking peds during cutsenes or the game end
if ( MusicManager.IsInitialised() )
@@ -1667,7 +1667,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
{
case MUSICMODE_CUTSCENE:
{
- return false;
+ return FALSE;
break;
}
@@ -1675,10 +1675,10 @@ cSampleManager::LoadPedComment(uint32 nComment)
}
if ( fseek(fpSampleDataHandle, m_aSamples[nComment].nOffset, SEEK_SET) != 0 )
- return false;
+ return FALSE;
if ( fread((void *)(nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE*nCurrentPedSlot), 1, m_aSamples[nComment].nSize, fpSampleDataHandle) != m_aSamples[nComment].nSize )
- return false;
+ return FALSE;
nPedSlotSfxAddr[nCurrentPedSlot] = nSampleBankMemoryStartAddress[SFX_BANK_PED_COMMENTS] + PED_BLOCKSIZE*nCurrentPedSlot;
nPedSlotSfx [nCurrentPedSlot] = nComment;
@@ -1686,7 +1686,7 @@ cSampleManager::LoadPedComment(uint32 nComment)
if ( ++nCurrentPedSlot >= MAX_PEDSFX )
nCurrentPedSlot = 0;
- return true;
+ return TRUE;
}
int32
@@ -1725,14 +1725,14 @@ cSampleManager::GetSampleLength(uint32 nSample)
return m_aSamples[nSample].nSize >> 1;
}
-bool
+bool8
cSampleManager::UpdateReverb(void)
{
if ( !usingEAX )
- return false;
+ return FALSE;
if ( AudioManager.GetFrameCounter() & 15 )
- return false;
+ return FALSE;
float fRatio = 0.0f;
@@ -1753,7 +1753,7 @@ cSampleManager::UpdateReverb(void)
fRatio = clamp(fRatio, 0.0f, 0.6f);
if ( fRatio == _fPrevEaxRatioDestination )
- return false;
+ return FALSE;
if ( usingEAX3 )
{
@@ -1775,13 +1775,13 @@ cSampleManager::UpdateReverb(void)
_fPrevEaxRatioDestination = fRatio;
- return true;
+ return TRUE;
}
void
-cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
+cSampleManager::SetChannelReverbFlag(uint32 nChannel, bool8 nReverbFlag)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
@@ -1789,14 +1789,14 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
if ( usingEAX )
{
- if ( nReverbFlag != 0 )
+ if ( nReverbFlag != FALSE )
{
if ( !b2d )
AIL_set_3D_sample_effects_level(opened_samples[nChannel], _fEffectsLevel);
@@ -1809,10 +1809,10 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag)
}
}
-bool
+bool8
cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
@@ -1820,7 +1820,7 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -1830,14 +1830,14 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
if ( nSfx < SAMPLEBANK_MAX )
{
if ( !IsSampleBankLoaded(nBank) )
- return false;
+ return FALSE;
addr = nSampleBankMemoryStartAddress[nBank] + m_aSamples[nSfx].nOffset - m_aSamples[BankStartOffset[nBank]].nOffset;
}
else
{
if ( !IsPedCommentLoaded(nSfx) )
- return false;
+ return FALSE;
int32 slot = _GetPedCommentSlot(nSfx);
@@ -1849,10 +1849,10 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
if ( opened_2dsamples[nChannel - MAXCHANNELS] )
{
AIL_set_sample_address(opened_2dsamples[nChannel - MAXCHANNELS], (void *)addr, m_aSamples[nSfx].nSize);
- return true;
+ return TRUE;
}
else
- return false;
+ return FALSE;
}
else
{
@@ -1868,10 +1868,10 @@ cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank)
if ( AIL_set_3D_sample_info(opened_samples[nChannel], &info) == 0 )
{
OutputDebugString(AIL_last_error());
- return false;
+ return FALSE;
}
- return true;
+ return TRUE;
}
}
@@ -1966,7 +1966,7 @@ cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan)
void
cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
@@ -1974,7 +1974,7 @@ cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq)
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -1994,7 +1994,7 @@ cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq)
void
cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
@@ -2002,7 +2002,7 @@ cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 n
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -2022,7 +2022,7 @@ cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 n
void
cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
@@ -2030,7 +2030,7 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -2047,10 +2047,10 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount)
}
}
-bool
+bool8
cSampleManager::GetChannelUsedFlag(uint32 nChannel)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
@@ -2058,7 +2058,7 @@ cSampleManager::GetChannelUsedFlag(uint32 nChannel)
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -2068,14 +2068,14 @@ cSampleManager::GetChannelUsedFlag(uint32 nChannel)
if ( opened_2dsamples[nChannel - MAXCHANNELS] )
return AIL_sample_status(opened_2dsamples[nChannel - MAXCHANNELS]) == SMP_PLAYING;
else
- return false;
+ return FALSE;
}
else
{
if ( opened_samples[nChannel] )
return AIL_3D_sample_status(opened_samples[nChannel]) == SMP_PLAYING;
else
- return false;
+ return FALSE;
}
}
@@ -2083,7 +2083,7 @@ cSampleManager::GetChannelUsedFlag(uint32 nChannel)
void
cSampleManager::StartChannel(uint32 nChannel)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
@@ -2091,7 +2091,7 @@ cSampleManager::StartChannel(uint32 nChannel)
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -2111,7 +2111,7 @@ cSampleManager::StartChannel(uint32 nChannel)
void
cSampleManager::StopChannel(uint32 nChannel)
{
- bool b2d = false;
+ bool8 b2d = FALSE;
switch ( nChannel )
{
@@ -2119,7 +2119,7 @@ cSampleManager::StopChannel(uint32 nChannel)
case CHANNEL2D+1:
case CHANNEL2D+2:
{
- b2d = true;
+ b2d = TRUE;
break;
}
}
@@ -2180,12 +2180,12 @@ cSampleManager::PreloadStreamedFile(uint32 nFile, uint8 nStream)
}
void
-cSampleManager::PauseStream(uint8 nPauseFlag, uint8 nStream)
+cSampleManager::PauseStream(bool8 nPauseFlag, uint8 nStream)
{
if ( m_bInitialised )
{
if ( mp3Stream[nStream] )
- AIL_pause_stream(mp3Stream[nStream], nPauseFlag != 0);
+ AIL_pause_stream(mp3Stream[nStream], nPauseFlag != FALSE);
}
}
@@ -2199,7 +2199,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream)
}
}
-bool
+bool8
cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
{
int i = 0;
@@ -2207,7 +2207,7 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
char filename[MAX_PATH];
if ( !m_bInitialised || nFile >= TOTAL_STREAMED_SOUNDS )
- return false;
+ return FALSE;
if ( mp3Stream[nStream] )
{
@@ -2243,12 +2243,12 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
}
if(mp3Stream[nStream]) {
AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1);
- nStreamLoopedFlag[nStream] = true;
+ nStreamLoopedFlag[nStream] = TRUE;
AIL_set_stream_ms_position(mp3Stream[nStream], position);
AIL_pause_stream(mp3Stream[nStream], 0);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
} else {
if ( e->pLinkPath != NULL )
@@ -2265,9 +2265,9 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
AIL_set_stream_ms_position(mp3Stream[nStream], position);
AIL_pause_stream(mp3Stream[nStream], 0);
- _bIsMp3Active = true;
+ _bIsMp3Active = TRUE;
- return true;
+ return TRUE;
}
// fall through, start playing from another song
}
@@ -2300,14 +2300,14 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
if(mp3Stream[nStream]) {
AIL_set_stream_loop_count(
mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1);
- nStreamLoopedFlag[nStream] = true;
+ nStreamLoopedFlag[nStream] = TRUE;
AIL_set_stream_ms_position(
mp3Stream[nStream], position);
AIL_pause_stream(mp3Stream[nStream],
0);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
}
if(mp3->pLinkPath != NULL)
@@ -2325,9 +2325,9 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
AIL_set_stream_ms_position(mp3Stream[nStream], 0);
AIL_pause_stream(mp3Stream[nStream], 0);
#ifdef FIX_BUGS
- _bIsMp3Active = true;
+ _bIsMp3Active = TRUE;
#endif
- return true;
+ return TRUE;
}
}
@@ -2352,12 +2352,12 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream)
if ( mp3Stream[nStream] )
{
AIL_set_stream_loop_count(mp3Stream[nStream], nStreamLoopedFlag[nStream] ? 0 : 1);
- nStreamLoopedFlag[nStream] = true;
+ nStreamLoopedFlag[nStream] = TRUE;
AIL_set_stream_ms_position(mp3Stream[nStream], position);
AIL_pause_stream(mp3Stream[nStream], 0);
- return true;
+ return TRUE;
}
- return false;
+ return FALSE;
}
void
@@ -2373,7 +2373,7 @@ cSampleManager::StopStreamedFile(uint8 nStream)
mp3Stream[nStream] = NULL;
if ( nStream == 0 )
- _bIsMp3Active = false;
+ _bIsMp3Active = FALSE;
}
}
}
@@ -2411,7 +2411,7 @@ cSampleManager::GetStreamedFilePosition(uint8 nStream)
}
void
-cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, uint8 nEffectFlag, uint8 nStream)
+cSampleManager::SetStreamedVolumeAndPan(uint8 nVolume, uint8 nPan, bool8 nEffectFlag, uint8 nStream)
{
uint8 vol = nVolume;
float boostMult = 0.0f;
@@ -2452,7 +2452,7 @@ cSampleManager::GetStreamedFileLength(uint8 nStream)
return 0;
}
-bool
+bool8
cSampleManager::IsStreamPlaying(uint8 nStream)
{
if ( m_bInitialised )
@@ -2460,16 +2460,16 @@ cSampleManager::IsStreamPlaying(uint8 nStream)
if ( mp3Stream[nStream] )
{
if ( AIL_stream_status(mp3Stream[nStream]) == SMP_PLAYING )
- return true;
+ return TRUE;
else
- return false;
+ return FALSE;
}
}
- return false;
+ return FALSE;
}
-bool
+bool8
cSampleManager::InitialiseSampleBanks(void)
{
SetUpDebugBanksInfo();
@@ -2478,7 +2478,7 @@ cSampleManager::InitialiseSampleBanks(void)
fpSampleDescHandle = fopen(SampleBankDescFilename, "rb");
if ( fpSampleDescHandle == NULL )
- return false;
+ return FALSE;
fpSampleDataHandle = fopen(SampleBankDataFilename, "rb");
if ( fpSampleDataHandle == NULL )
@@ -2486,7 +2486,7 @@ cSampleManager::InitialiseSampleBanks(void)
fclose(fpSampleDescHandle);
fpSampleDescHandle = NULL;
- return false;
+ return FALSE;
}
fseek(fpSampleDataHandle, 0, SEEK_END);
@@ -2513,7 +2513,7 @@ cSampleManager::InitialiseSampleBanks(void)
nSampleBankSize[SFX_BANK_0] = nSampleBankDiscStartOffset[SFX_BANK_PED_COMMENTS] - nSampleBankDiscStartOffset[SFX_BANK_0];
nSampleBankSize[SFX_BANK_PED_COMMENTS] = _nSampleDataEndOffset - nSampleBankDiscStartOffset[SFX_BANK_PED_COMMENTS];
- return true;
+ return TRUE;
}