diff options
author | Sergeanur <s.anureev@yandex.ua> | 2021-05-22 12:08:26 +0200 |
---|---|---|
committer | Sergeanur <s.anureev@yandex.ua> | 2021-06-24 20:34:32 +0200 |
commit | 5bcdb933a78abb2b9b8d6648d17502240bd9fd29 (patch) | |
tree | df31ee5fefd2ee7716b9ba01cc0062361520a655 /src/audio/sampman_miles.cpp | |
parent | Fix C3dMarkers::PlaceMarker calls in Radar (diff) | |
download | re3-5bcdb933a78abb2b9b8d6648d17502240bd9fd29.tar re3-5bcdb933a78abb2b9b8d6648d17502240bd9fd29.tar.gz re3-5bcdb933a78abb2b9b8d6648d17502240bd9fd29.tar.bz2 re3-5bcdb933a78abb2b9b8d6648d17502240bd9fd29.tar.lz re3-5bcdb933a78abb2b9b8d6648d17502240bd9fd29.tar.xz re3-5bcdb933a78abb2b9b8d6648d17502240bd9fd29.tar.zst re3-5bcdb933a78abb2b9b8d6648d17502240bd9fd29.zip |
Diffstat (limited to '')
-rw-r--r-- | src/audio/sampman_miles.cpp | 282 |
1 files changed, 141 insertions, 141 deletions
diff --git a/src/audio/sampman_miles.cpp b/src/audio/sampman_miles.cpp index 3eee78ae..a6f04775 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]; @@ -459,7 +459,7 @@ cSampleManager::AutoDetect3DProviders() return -1; } -static bool +static bool8 _ResolveLink(char const *path, char *out) { IShellLink* psl; @@ -495,7 +495,7 @@ _ResolveLink(char const *path, char *out) ppf->Release(); psl->Release(); #endif - return true; + return TRUE; } } } @@ -505,15 +505,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]; @@ -565,10 +565,10 @@ _FindMP3s(void) OutputDebugString(filepath); } - bShortcut = true; + bShortcut = TRUE; } else - bShortcut = false; + bShortcut = FALSE; } mp3Stream[0] = AIL_open_stream(DIG, filepath, 0); @@ -608,7 +608,7 @@ _FindMP3s(void) { _pMP3List->pLinkPath = NULL; } - bInitFirstEntry = false; + bInitFirstEntry = FALSE; } else { @@ -616,10 +616,10 @@ _FindMP3s(void) OutputDebugString(filepath); - bInitFirstEntry = true; + bInitFirstEntry = TRUE; } - while ( true ) + while ( TRUE ) { if ( !FindNextFile(hFind, &fd) ) break; @@ -643,11 +643,11 @@ _FindMP3s(void) OutputDebugString(filepath); } - bShortcut = true; + bShortcut = TRUE; } else { - bShortcut = false; + bShortcut = FALSE; if ( filepathlen > MAX_PATH ) { @@ -690,7 +690,7 @@ _FindMP3s(void) pList = _pMP3List; - bInitFirstEntry = false; + bInitFirstEntry = FALSE; } else { @@ -718,11 +718,11 @@ _FindMP3s(void) OutputDebugString(filepath); } - bShortcut = true; + bShortcut = TRUE; } else { - bShortcut = false; + bShortcut = FALSE; } } @@ -834,7 +834,7 @@ _GetMP3EntryByIndex(uint32 idx) return NULL; } -static inline bool +static inline bool8 _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry) { _CurMP3Index = 0; @@ -847,7 +847,7 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry) *pPosition -= (*pEntry)->nTrackStreamPos; _CurMP3Pos = *pPosition; - return true; + return TRUE; } _CurMP3Index++; @@ -858,10 +858,10 @@ _GetMP3PosFromStreamPos(uint32 *pPosition, tMP3Entry **pEntry) _CurMP3Pos = 0; _CurMP3Index = 0; - return false; + return FALSE; } -bool +bool8 cSampleManager::IsMP3RadioChannelAvailable(void) { return nNumMP3s != 0; @@ -890,13 +890,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++ ) @@ -922,7 +922,7 @@ cSampleManager::Initialise(void) curprovider = -1; prevprovider = -1; - _usingMilesFast2D = false; + _usingMilesFast2D = FALSE; usingEAX=0; usingEAX3=0; @@ -947,7 +947,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; @@ -988,24 +988,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) @@ -1046,7 +1046,7 @@ cSampleManager::Initialise(void) { OutputDebugString(AIL_last_error()); Terminate(); - return false; + return FALSE; } add_providers(); @@ -1076,9 +1076,9 @@ cSampleManager::Initialise(void) } else { - m_bInitialised = false; + m_bInitialised = FALSE; Terminate(); - return false; + return FALSE; } } @@ -1113,7 +1113,7 @@ cSampleManager::Initialise(void) AIL_close_stream(mp3Stream[0]); mp3Stream[0] = NULL; - bFileNotFound = false; + bFileNotFound = FALSE; #ifdef AUDIO_CACHE if (!CreateCache) break; @@ -1124,7 +1124,7 @@ cSampleManager::Initialise(void) } else { - bFileNotFound = true; + bFileNotFound = TRUE; break; } } @@ -1159,11 +1159,11 @@ cSampleManager::Initialise(void) mp3Stream[0] = NULL; nStreamLength[i] = tatalms; - bFileNotFound = false; + bFileNotFound = FALSE; } else { - bFileNotFound = true; + bFileNotFound = TRUE; break; } } @@ -1178,11 +1178,11 @@ cSampleManager::Initialise(void) if ( FrontEndMenuManager.m_bQuitGameNoCD ) { Terminate(); - return false; + return FALSE; } continue; #else - m_bInitialised = true; + m_bInitialised = TRUE; #endif } @@ -1201,14 +1201,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); @@ -1237,7 +1237,7 @@ cSampleManager::Initialise(void) TRACE("providerset"); { - _bSampmanInitialised = true; + _bSampmanInitialised = TRUE; U32 n = 0; @@ -1254,7 +1254,7 @@ cSampleManager::Initialise(void) if ( n == m_nNumberOfProviders ) { Terminate(); - return false; + return FALSE; } } @@ -1279,13 +1279,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); } @@ -1317,12 +1317,12 @@ cSampleManager::Initialise(void) else _CurMP3Pos = 0; - _bIsMp3Active = false; + _bIsMp3Active = FALSE; } TRACE("end"); - return true; + return TRUE; } void @@ -1371,10 +1371,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 @@ -1392,17 +1392,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) } @@ -1484,48 +1484,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; @@ -1538,10 +1538,10 @@ cSampleManager::IsPedCommentLoaded(uint32 nComment) slot += ARRAY_SIZE(nPedSlotSfx); #endif if ( nComment == nPedSlotSfx[slot] ) - return true; + return TRUE; } - return false; + return FALSE; } int32 @@ -1563,11 +1563,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() ) @@ -1576,7 +1576,7 @@ cSampleManager::LoadPedComment(uint32 nComment) { case MUSICMODE_CUTSCENE: { - return false; + return FALSE; break; } @@ -1584,10 +1584,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; @@ -1595,7 +1595,7 @@ cSampleManager::LoadPedComment(uint32 nComment) if ( ++nCurrentPedSlot >= MAX_PEDSFX ) nCurrentPedSlot = 0; - return true; + return TRUE; } int32 @@ -1634,14 +1634,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; @@ -1662,7 +1662,7 @@ cSampleManager::UpdateReverb(void) fRatio = clamp(fRatio, 0.0f, 0.6f); if ( fRatio == _fPrevEaxRatioDestination ) - return false; + return FALSE; if ( usingEAX3 ) { @@ -1684,26 +1684,26 @@ 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 ) { case CHANNEL2D: { - 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); @@ -1716,16 +1716,16 @@ cSampleManager::SetChannelReverbFlag(uint32 nChannel, uint8 nReverbFlag) } } -bool +bool8 cSampleManager::InitialiseChannel(uint32 nChannel, uint32 nSfx, uint8 nBank) { - bool b2d = false; + bool8 b2d = FALSE; switch ( nChannel ) { case CHANNEL2D: { - b2d = true; + b2d = TRUE; break; } } @@ -1735,14 +1735,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); @@ -1754,10 +1754,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 { @@ -1773,10 +1773,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; } } @@ -1867,13 +1867,13 @@ cSampleManager::SetChannelPan(uint32 nChannel, uint32 nPan) void cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq) { - bool b2d = false; + bool8 b2d = FALSE; switch ( nChannel ) { case CHANNEL2D: { - b2d = true; + b2d = TRUE; break; } } @@ -1893,13 +1893,13 @@ cSampleManager::SetChannelFrequency(uint32 nChannel, uint32 nFreq) void cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 nLoopEnd) { - bool b2d = false; + bool8 b2d = FALSE; switch ( nChannel ) { case CHANNEL2D: { - b2d = true; + b2d = TRUE; break; } } @@ -1919,13 +1919,13 @@ cSampleManager::SetChannelLoopPoints(uint32 nChannel, uint32 nLoopStart, int32 n void cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount) { - bool b2d = false; + bool8 b2d = FALSE; switch ( nChannel ) { case CHANNEL2D: { - b2d = true; + b2d = TRUE; break; } } @@ -1942,16 +1942,16 @@ cSampleManager::SetChannelLoopCount(uint32 nChannel, uint32 nLoopCount) } } -bool +bool8 cSampleManager::GetChannelUsedFlag(uint32 nChannel) { - bool b2d = false; + bool8 b2d = FALSE; switch ( nChannel ) { case CHANNEL2D: { - b2d = true; + b2d = TRUE; break; } } @@ -1961,14 +1961,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; } } @@ -1976,13 +1976,13 @@ cSampleManager::GetChannelUsedFlag(uint32 nChannel) void cSampleManager::StartChannel(uint32 nChannel) { - bool b2d = false; + bool8 b2d = FALSE; switch ( nChannel ) { case CHANNEL2D: { - b2d = true; + b2d = TRUE; break; } } @@ -2002,13 +2002,13 @@ cSampleManager::StartChannel(uint32 nChannel) void cSampleManager::StopChannel(uint32 nChannel) { - bool b2d = false; + bool8 b2d = FALSE; switch ( nChannel ) { case CHANNEL2D: { - b2d = true; + b2d = TRUE; break; } } @@ -2060,12 +2060,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); } } @@ -2079,7 +2079,7 @@ cSampleManager::StartPreloadedStreamedFile(uint8 nStream) } } -bool +bool8 cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream) { int i = 0; @@ -2087,7 +2087,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] ) { @@ -2114,12 +2114,12 @@ cSampleManager::StartStreamedFile(uint32 nFile, uint32 nPos, uint8 nStream) AIL_open_stream(DIG, filename, 0); 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 ) @@ -2136,9 +2136,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 } @@ -2163,14 +2163,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) @@ -2188,9 +2188,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; } } @@ -2207,12 +2207,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 @@ -2228,7 +2228,7 @@ cSampleManager::StopStreamedFile(uint8 nStream) mp3Stream[nStream] = NULL; if ( nStream == 0 ) - _bIsMp3Active = false; + _bIsMp3Active = FALSE; } } } @@ -2266,7 +2266,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; @@ -2307,7 +2307,7 @@ cSampleManager::GetStreamedFileLength(uint8 nStream) return 0; } -bool +bool8 cSampleManager::IsStreamPlaying(uint8 nStream) { if ( m_bInitialised ) @@ -2315,23 +2315,23 @@ 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) { int32 nBank = SFX_BANK_0; fpSampleDescHandle = fopen(SampleBankDescFilename, "rb"); if ( fpSampleDescHandle == NULL ) - return false; + return FALSE; fpSampleDataHandle = fopen(SampleBankDataFilename, "rb"); if ( fpSampleDataHandle == NULL ) @@ -2339,7 +2339,7 @@ cSampleManager::InitialiseSampleBanks(void) fclose(fpSampleDescHandle); fpSampleDescHandle = NULL; - return false; + return FALSE; } fseek(fpSampleDataHandle, 0, SEEK_END); @@ -2366,7 +2366,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; } |