From 58de524d70beff5d917bc9eaf72a0f8d3e18840d Mon Sep 17 00:00:00 2001 From: withmorten Date: Sun, 11 Jul 2021 03:26:59 +0200 Subject: tiny diff fix --- src/audio/oal/stream.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/audio') diff --git a/src/audio/oal/stream.cpp b/src/audio/oal/stream.cpp index 7fc36acd..3789573e 100644 --- a/src/audio/oal/stream.cpp +++ b/src/audio/oal/stream.cpp @@ -1648,7 +1648,7 @@ void CStream::SetPlay(bool state) { ALint sourceState = AL_STOPPED; alGetSourcei(m_pAlSources[0], AL_SOURCE_STATE, &sourceState); - if (sourceState != AL_STOPPED ) + if (sourceState != AL_STOPPED) alSourceStop(m_pAlSources[0]); sourceState = AL_STOPPED; -- cgit v1.2.3 From f6860657692ded8e7dd3c569f1cf736f844c75c8 Mon Sep 17 00:00:00 2001 From: withmorten Date: Sun, 11 Jul 2021 03:59:37 +0200 Subject: get rid of // done comments in audiomanager.h --- src/audio/AudioManager.h | 348 +++++++++++++++++++++++------------------------ 1 file changed, 174 insertions(+), 174 deletions(-) (limited to 'src/audio') diff --git a/src/audio/AudioManager.h b/src/audio/AudioManager.h index 2e3aeb6d..bba4b0d7 100644 --- a/src/audio/AudioManager.h +++ b/src/audio/AudioManager.h @@ -96,8 +96,8 @@ public: m_nCommentsInBank[i] = 0; m_nActiveBank = 0; } - void Add(tPedComment *com); // done - void Process(); // done + void Add(tPedComment *com); + void Process(); }; VALIDATE_SIZE(cPedComments, 0x490); @@ -251,34 +251,34 @@ public: ~cAudioManager(); // getters - uint32 GetFrameCounter() const { return m_FrameCounter; } // done - float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; } // done + uint32 GetFrameCounter() const { return m_FrameCounter; } + float GetReflectionsDistance(int32 idx) const { return m_afReflectionsDistances[idx]; } int32 GetRandomNumber(int32 idx) const { return m_anRandomTable[idx]; } int32 GetRandomNumberInRange(int32 idx, int32 low, int32 high) const { return (m_anRandomTable[idx] % (high - low + 1)) + low; } bool8 IsMissionAudioSamplePlaying(uint8 slot) const; // { return m_sMissionAudio.m_nPlayStatus == 1; } bool8 ShouldDuckMissionAudio(uint8 slot) const; // "Should" be in alphabetic order, except "getXTalkSfx" - void AddDetailsToRequestedOrderList(uint8 sample); // done (inlined in vc) - void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool8 notLooping); // done - void AddReflectionsToRequestedQueue(); // done - void AddReleasingSounds(); // done - void AddSampleToRequestedQueue(); // done - void AgeCrimes(); // done (inlined in vc) - - void CalculateDistance(bool8 &condition, float dist); // done - bool8 CheckForAnAudioFileOnCD() const; // done - void ClearActiveSamples(); // done - void ClearMissionAudio(uint8 slot); // done (inlined in vc) - void ClearRequestedQueue(); // done (inlined in vc) - uint32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier) const; // done - int32 ComputePan(float, CVector *); // done - uint8 ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const; // done - int32 CreateEntity(eAudioType type, void *entity); // done - - void DestroyAllGameCreatedEntities(); // done - void DestroyEntity(int32 id); // done (inlined in vc) - void DoPoliceRadioCrackle(); // done + void AddDetailsToRequestedOrderList(uint8 sample); // inlined in vc + void AddPlayerCarSample(uint8 emittingVolume, int32 freq, uint32 sample, uint8 bank, uint8 counter, bool8 notLooping); + void AddReflectionsToRequestedQueue(); + void AddReleasingSounds(); + void AddSampleToRequestedQueue(); + void AgeCrimes(); // inlined in vc + + void CalculateDistance(bool8 &condition, float dist); + bool8 CheckForAnAudioFileOnCD() const; + void ClearActiveSamples(); + void ClearMissionAudio(uint8 slot); // inlined in vc + void ClearRequestedQueue(); // inlined in vc + uint32 ComputeDopplerEffectedFrequency(uint32 oldFreq, float position1, float position2, float speedMultiplier) const; + int32 ComputePan(float, CVector *); + uint8 ComputeVolume(uint8 emittingVolume, float soundIntensity, float distance) const; + int32 CreateEntity(eAudioType type, void *entity); + + void DestroyAllGameCreatedEntities(); + void DestroyEntity(int32 id); // inlined in vc + void DoPoliceRadioCrackle(); // functions returning talk sfx, // order from GetPedCommentSfx @@ -295,8 +295,8 @@ public: uint32 GetHMYSTTalkSfx(CPed *ped, int16 sound); uint32 GetHMOSTTalkSfx(CPed *ped, int16 sound); uint32 GetHFYRITalkSfx(CPed *ped, int16 sound); - uint32 GetHFORITalkSfx(CPed *ped, int16 sound); - uint32 GetHMYRITalkSfx(CPed *ped, int16 sound); + uint32 GetHFORITalkSfx(CPed *ped, int16 sound); + uint32 GetHMYRITalkSfx(CPed *ped, int16 sound); uint32 GetHMORITalkSfx(CPed *ped, int16 sound); uint32 GetHFYBETalkSfx(CPed *ped, int16 sound); uint32 GetHFOBETalkSfx(CPed *ped, int16 sound); @@ -379,170 +379,170 @@ public: uint32 GetGenericFemaleTalkSfx(CPed *ped, int16 sound); // todo names (inlined in vc) // end of functions returning talk sfx - void GenerateIntegerRandomNumberTable(); // done - char *Get3DProviderName(uint8 id) const; // done - char GetCDAudioDriveLetter() const; // done - int8 GetCurrent3DProviderIndex() const; // done - int8 AutoDetect3DProviders() const; // done - float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used - float GetCollisionOneShotRatio(int32 a, float b) const; // done - float GetCollisionRatio(float a, float b, float c, float d) const; // done (inlined in vc) - float GetDistanceSquared(const CVector &v) const; // done (inlined in vc) - int32 GetJumboTaxiFreq() const; // done (inlined in vc) - uint8 GetMissionAudioLoadingStatus(uint8 slot) const; // done - int8 GetMissionScriptPoliceAudioPlayingStatus() const; // done - uint8 GetNum3DProvidersAvailable() const; // done - uint32 GetPedCommentSfx(CPed *ped, int32 sound); // done - void GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset) const; // done + void GenerateIntegerRandomNumberTable(); + char *Get3DProviderName(uint8 id) const; + char GetCDAudioDriveLetter() const; + int8 GetCurrent3DProviderIndex() const; + int8 AutoDetect3DProviders() const; + float GetCollisionLoopingRatio(uint32 a, uint32 b, float c) const; // not used + float GetCollisionOneShotRatio(int32 a, float b) const; + float GetCollisionRatio(float a, float b, float c, float d) const; // inlined in vc + float GetDistanceSquared(const CVector &v) const; // inlined in vc + int32 GetJumboTaxiFreq() const; // inlined in vc + uint8 GetMissionAudioLoadingStatus(uint8 slot) const; + int8 GetMissionScriptPoliceAudioPlayingStatus() const; + uint8 GetNum3DProvidersAvailable() const; + uint32 GetPedCommentSfx(CPed *ped, int32 sound); + void GetPhrase(uint32 &phrase, uint32 &prevPhrase, uint32 sample, uint32 maxOffset) const; float GetVehicleDriveWheelSkidValue(CVehicle *veh, tWheelState wheelState, float gasPedalAudio, cTransmission *transmission, - float velocityChange); // done - float GetVehicleNonDriveWheelSkidValue(CVehicle *veh, tWheelState wheelState, cTransmission *transmission, float velocityChange); // done - - bool8 HasAirBrakes(int32 model) const; // done - - void Initialise(); // done - void InitialisePoliceRadio(); // done - void InitialisePoliceRadioZones(); // done - void InterrogateAudioEntities(); // done (inlined) - bool8 IsAudioInitialised() const; // done - bool8 IsMissionAudioSampleFinished(uint8 slot); // done - bool8 IsMP3RadioChannelAvailable() const; // done - - bool8 MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; //done - - void PlayLoadedMissionAudio(uint8 slot); // done - void PlayOneShot(int32 index, uint16 sound, float vol); // done - void PlaySuspectLastSeen(float x, float y, float z); // done - void PlayerJustGotInCar() const; // done - void PlayerJustLeftCar() const; // done - void PostInitialiseGameSpecificSetup(); // done - void PostTerminateGameSpecificShutdown(); // done - void PreInitialiseGameSpecificSetup() const; // done - void PreloadMissionAudio(uint8 slot, Const char *name); // done - void PreTerminateGameSpecificShutdown(); // done + float velocityChange); + float GetVehicleNonDriveWheelSkidValue(CVehicle *veh, tWheelState wheelState, cTransmission *transmission, float velocityChange); + + bool8 HasAirBrakes(int32 model) const; + + void Initialise(); + void InitialisePoliceRadio(); + void InitialisePoliceRadioZones(); + void InterrogateAudioEntities(); // inlined + bool8 IsAudioInitialised() const; + bool8 IsMissionAudioSampleFinished(uint8 slot); + bool8 IsMP3RadioChannelAvailable() const; + + bool8 MissionScriptAudioUsesPoliceChannel(int32 soundMission) const; + + void PlayLoadedMissionAudio(uint8 slot); + void PlayOneShot(int32 index, uint16 sound, float vol); + void PlaySuspectLastSeen(float x, float y, float z); + void PlayerJustGotInCar() const; + void PlayerJustLeftCar() const; + void PostInitialiseGameSpecificSetup(); + void PostTerminateGameSpecificShutdown(); + void PreInitialiseGameSpecificSetup() const; + void PreloadMissionAudio(uint8 slot, Const char *name); + void PreTerminateGameSpecificShutdown(); /// processX - main logic of adding new sounds - void ProcessActiveQueues(); // done - bool8 ProcessAirBrakes(cVehicleParams& params); // done + void ProcessActiveQueues(); + bool8 ProcessAirBrakes(cVehicleParams& params); bool8 ProcessBoatEngine(cVehicleParams& params); - bool8 ProcessBoatMovingOverWater(cVehicleParams& params); //done + bool8 ProcessBoatMovingOverWater(cVehicleParams& params); #ifdef GTA_BRIDGE - void ProcessBridge(); // done(bcs not exists in VC) - void ProcessBridgeMotor(); // done(bcs not exists in VC) - void ProcessBridgeOneShots(); // done(bcs not exists in VC) - void ProcessBridgeWarning(); // done(bcs not exists in VC) + void ProcessBridge(); + void ProcessBridgeMotor(); + void ProcessBridgeOneShots(); + void ProcessBridgeWarning(); #endif - bool8 ProcessCarBombTick(cVehicleParams& params); // done - void ProcessCarHeli(cVehicleParams& params); // done - void ProcessCesna(cVehicleParams& params); // done - //void ProcessCrane(); // done(bcs not exists in VC) - bool8 ProcessEngineDamage(cVehicleParams& params); // done - void ProcessEntity(int32 sound); // done - void ProcessExplosions(int32 explosion); // done - void ProcessFireHydrant(); // done - void ProcessFires(int32 entity); // done - void ProcessFrontEnd(); // done - void ProcessGarages(); // done - void ProcessJumbo(cVehicleParams& params); // done - void ProcessJumboAccel(CPlane *plane); // done - void ProcessJumboDecel(CPlane *plane); // done - void ProcessJumboFlying(); // done - void ProcessJumboLanding(CPlane *plane); // done - void ProcessJumboTakeOff(CPlane *plane); // done - void ProcessJumboTaxi(); // done - void ProcessLoopingScriptObject(uint8 sound); // done - void ProcessMissionAudio(); // done - void ProcessMissionAudioSlot(uint8 slot); // done - void ProcessModelHeliVehicle(cVehicleParams& params); // done - void ProcessModelVehicle(cVehicleParams& params); // done - void ProcessOneShotScriptObject(uint8 sound); // - void ProcessPed(CPhysical *ped); // done - void ProcessPedOneShots(cPedParams ¶ms); // - void ProcessPhysical(int32 id); // done - void ProcessPlane(cVehicleParams& params); // done - void ProcessPlayerMood(); // done - void ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh); // done - void ProcessProjectiles(); // done - void ProcessRainOnVehicle(cVehicleParams& params); // done - void ProcessReverb() const; // done - bool8 ProcessReverseGear(cVehicleParams& params); // done - void ProcessScriptObject(int32 id); // done - void ProcessSpecial(); // done + bool8 ProcessCarBombTick(cVehicleParams& params); + void ProcessCarHeli(cVehicleParams& params); + void ProcessCesna(cVehicleParams& params); + //void ProcessCrane(); + bool8 ProcessEngineDamage(cVehicleParams& params); + void ProcessEntity(int32 sound); + void ProcessExplosions(int32 explosion); + void ProcessFireHydrant(); + void ProcessFires(int32 entity); + void ProcessFrontEnd(); + void ProcessGarages(); + void ProcessJumbo(cVehicleParams& params); + void ProcessJumboAccel(CPlane *plane); + void ProcessJumboDecel(CPlane *plane); + void ProcessJumboFlying(); + void ProcessJumboLanding(CPlane *plane); + void ProcessJumboTakeOff(CPlane *plane); + void ProcessJumboTaxi(); + void ProcessLoopingScriptObject(uint8 sound); + void ProcessMissionAudio(); + void ProcessMissionAudioSlot(uint8 slot); + void ProcessModelHeliVehicle(cVehicleParams& params); + void ProcessModelVehicle(cVehicleParams& params); + void ProcessOneShotScriptObject(uint8 sound); + void ProcessPed(CPhysical *ped); + void ProcessPedOneShots(cPedParams ¶ms); + void ProcessPhysical(int32 id); + void ProcessPlane(cVehicleParams& params); + void ProcessPlayerMood(); + void ProcessPlayersVehicleEngine(cVehicleParams& params, CVehicle* veh); + void ProcessProjectiles(); + void ProcessRainOnVehicle(cVehicleParams& params); + void ProcessReverb() const; + bool8 ProcessReverseGear(cVehicleParams& params); + void ProcessScriptObject(int32 id); + void ProcessSpecial(); #ifdef GTA_TRAIN - bool8 ProcessTrainNoise(cVehicleParams *params); //done(bcs not exists in VC) + bool8 ProcessTrainNoise(cVehicleParams *params); #endif - void ProcessVehicle(CVehicle *vehicle); // done - bool8 ProcessVehicleDoors(cVehicleParams ¶ms); // done - void ProcessVehicleEngine(cVehicleParams ¶ms); // done - void ProcessVehicleFlatTyre(cVehicleParams ¶ms); // done - bool8 ProcessVehicleHorn(cVehicleParams ¶ms); // done - void ProcessVehicleOneShots(cVehicleParams ¶ms); // done - bool8 ProcessVehicleReverseWarning(cVehicleParams ¶ms); // done - bool8 ProcessVehicleRoadNoise(cVehicleParams ¶ms); // done - bool8 ProcessVehicleSirenOrAlarm(cVehicleParams ¶ms); // done - bool8 ProcessVehicleSkidding(cVehicleParams ¶ms); // done - void ProcessWaterCannon(int32); // done - void ProcessWeather(int32 id); // done - bool8 ProcessWetRoadNoise(cVehicleParams& params); // done - void ProcessEscalators(); // done - void ProcessExtraSounds(); // done - - int32 RandomDisplacement(uint32 seed) const; // done - void ReacquireDigitalHandle() const; // done - void ReleaseDigitalHandle() const; // done - void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower, float intensity2); // done - void ReportCrime(eCrimeType crime, const CVector &pos); // done - void ResetAudioLogicTimers(uint32 timer); // done - void ResetPoliceRadio(); // done - void ResetTimers(uint32 time); // done - - void Service(); // done - void ServiceCollisions(); // done - void ServicePoliceRadio(); // done - void ServicePoliceRadioChannel(uint8 wantedLevel); // done - void ServiceSoundEffects(); // done - int8 SetCurrent3DProvider(uint8 which); // done - void SetDynamicAcousticModelingStatus(bool8 status); // done - void SetEffectsFadeVol(uint8 volume) const; // done - void SetEffectsMasterVolume(uint8 volume) const; // done - void SetMP3BoostVolume(uint8 volume) const; // done - void SetEntityStatus(int32 id, bool8 status); // done - uint32 SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision); // done - void SetMissionAudioLocation(uint8 slot, float x, float y, float z); // done - void SetMissionScriptPoliceAudio(int32 sfx) const; // inlined and optimized - void SetMonoMode(bool8 mono); // done - void SetMusicFadeVol(uint8 volume) const; // done - void SetMusicMasterVolume(uint8 volume) const; // done - void SetSpeakerConfig(int32 conf) const; // done - void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter); // done - void SetUpOneShotCollisionSound(const cAudioCollision &col); // done - bool8 SetupCrimeReport(); // done - bool8 SetupJumboEngineSound(uint8 vol, uint32 freq); // done - bool8 SetupJumboFlySound(uint8 emittingVol); // done - bool8 SetupJumboRumbleSound(uint8 emittingVol); // done - bool8 SetupJumboTaxiSound(uint8 vol); // done - bool8 SetupJumboWhineSound(uint8 emittingVol, uint32 freq); // done - void SetupPedComments(cPedParams ¶ms, uint16 sound); // done + void ProcessVehicle(CVehicle *vehicle); + bool8 ProcessVehicleDoors(cVehicleParams ¶ms); + void ProcessVehicleEngine(cVehicleParams ¶ms); + void ProcessVehicleFlatTyre(cVehicleParams ¶ms); + bool8 ProcessVehicleHorn(cVehicleParams ¶ms); + void ProcessVehicleOneShots(cVehicleParams ¶ms); + bool8 ProcessVehicleReverseWarning(cVehicleParams ¶ms); + bool8 ProcessVehicleRoadNoise(cVehicleParams ¶ms); + bool8 ProcessVehicleSirenOrAlarm(cVehicleParams ¶ms); + bool8 ProcessVehicleSkidding(cVehicleParams ¶ms); + void ProcessWaterCannon(int32); + void ProcessWeather(int32 id); + bool8 ProcessWetRoadNoise(cVehicleParams& params); + void ProcessEscalators(); + void ProcessExtraSounds(); + + int32 RandomDisplacement(uint32 seed) const; + void ReacquireDigitalHandle() const; + void ReleaseDigitalHandle() const; + void ReportCollision(CEntity *entity1, CEntity *entity2, uint8 surface1, uint8 surface2, float collisionPower, float intensity2); + void ReportCrime(eCrimeType crime, const CVector &pos); + void ResetAudioLogicTimers(uint32 timer); + void ResetPoliceRadio(); + void ResetTimers(uint32 time); + + void Service(); + void ServiceCollisions(); + void ServicePoliceRadio(); + void ServicePoliceRadioChannel(uint8 wantedLevel); + void ServiceSoundEffects(); + int8 SetCurrent3DProvider(uint8 which); + void SetDynamicAcousticModelingStatus(bool8 status); + void SetEffectsFadeVol(uint8 volume) const; + void SetEffectsMasterVolume(uint8 volume) const; + void SetMP3BoostVolume(uint8 volume) const; + void SetEntityStatus(int32 id, bool8 status); + uint32 SetLoopingCollisionRequestedSfxFreqAndGetVol(const cAudioCollision &audioCollision); + void SetMissionAudioLocation(uint8 slot, float x, float y, float z); + void SetMissionScriptPoliceAudio(int32 sfx) const; // inlined and optimized + void SetMonoMode(bool8 mono); + void SetMusicFadeVol(uint8 volume) const; + void SetMusicMasterVolume(uint8 volume) const; + void SetSpeakerConfig(int32 conf) const; + void SetUpLoopingCollisionSound(const cAudioCollision &col, uint8 counter); + void SetUpOneShotCollisionSound(const cAudioCollision &col); + bool8 SetupCrimeReport(); + bool8 SetupJumboEngineSound(uint8 vol, uint32 freq); + bool8 SetupJumboFlySound(uint8 emittingVol); + bool8 SetupJumboRumbleSound(uint8 emittingVol); + bool8 SetupJumboTaxiSound(uint8 vol); + bool8 SetupJumboWhineSound(uint8 emittingVol, uint32 freq); + void SetupPedComments(cPedParams ¶ms, uint16 sound); void SetupSuspectLastSeenReport(); - void Terminate(); // done - void TranslateEntity(Const CVector *v1, CVector *v2) const; // done + void Terminate(); + void TranslateEntity(Const CVector *v1, CVector *v2) const; - void UpdateGasPedalAudio(CVehicle *veh, int vehType); // done - void UpdateReflections(); // done - bool8 UsesReverseWarning(int32 model) const; // done - bool8 UsesSiren(cVehicleParams ¶ms) const; // done - bool8 UsesSirenSwitching(cVehicleParams ¶ms) const; // done + void UpdateGasPedalAudio(CVehicle *veh, int vehType); + void UpdateReflections(); + bool8 UsesReverseWarning(int32 model) const; + bool8 UsesSiren(cVehicleParams ¶ms) const; + bool8 UsesSirenSwitching(cVehicleParams ¶ms) const; - CVehicle *FindVehicleOfPlayer(); // done - void SetPedTalkingStatus(CPed *ped, bool8 status); // done - void SetPlayersMood(uint8 mood, uint32 time); // done + CVehicle *FindVehicleOfPlayer(); + void SetPedTalkingStatus(CPed *ped, bool8 status); + void SetPlayersMood(uint8 mood, uint32 time); float Sqrt(float v) const { return v <= 0.0f ? 0.0f : ::Sqrt(v); } #ifdef GTA_PC // only used in pc - void AdjustSamplesVolume(); // done (inlined) - uint8 ComputeEmittingVolume(uint8 emittingVolume, float intensity, float dist); // done (inlined) + void AdjustSamplesVolume(); // inlined + uint8 ComputeEmittingVolume(uint8 emittingVolume, float intensity, float dist); // inlined #endif }; -- cgit v1.2.3