aboutsummaryrefslogtreecommitdiff
path: root/Minecraft.Client/Common/Audio/SoundEngine.h
diff options
context:
space:
mode:
authorModMaker101 <119018978+ModMaker101@users.noreply.github.com>2026-03-08 19:08:36 -0400
committerGitHub <noreply@github.com>2026-03-08 18:08:36 -0500
commit28614b922fb77149a54da1a87bebfbc98736f296 (patch)
tree7f828ba86a4ee18d0a80d29de64f6199a5412512 /Minecraft.Client/Common/Audio/SoundEngine.h
parent88798b501d0cf6287b6f87acb2592676e3cec58d (diff)
Modernize project codebase (#906)
* Fixed boats falling and a TP glitch #266 * Replaced every C-style cast with C++ ones * Replaced every C-style cast with C++ ones * Fixed boats falling and a TP glitch #266 * Updated NULL to nullptr and fixing some type issues * Modernized and fixed a few bugs - Replaced most instances of `NULL` with `nullptr`. - Replaced most `shared_ptr(new ...)` with `make_shared`. - Removed the `nullptr` macro as it was interfering with the actual nullptr keyword in some instances. * Fixing more conflicts * Replace int loops with size_t and start work on overrides * Add safety checks and fix a issue with vector going OOR
Diffstat (limited to 'Minecraft.Client/Common/Audio/SoundEngine.h')
-rw-r--r--Minecraft.Client/Common/Audio/SoundEngine.h31
1 files changed, 16 insertions, 15 deletions
diff --git a/Minecraft.Client/Common/Audio/SoundEngine.h b/Minecraft.Client/Common/Audio/SoundEngine.h
index 5417dcec..2134c491 100644
--- a/Minecraft.Client/Common/Audio/SoundEngine.h
+++ b/Minecraft.Client/Common/Audio/SoundEngine.h
@@ -108,23 +108,23 @@ class SoundEngine : public ConsoleSoundEngine
static const int MAX_SAME_SOUNDS_PLAYING = 8; // 4J added
public:
SoundEngine();
- virtual void destroy();
+ void destroy() override;
#ifdef _DEBUG
void GetSoundName(char *szSoundName,int iSound);
#endif
- virtual void play(int iSound, float x, float y, float z, float volume, float pitch);
- virtual void playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay=true);
- virtual void playUI(int iSound, float volume, float pitch);
- virtual void playMusicTick();
- virtual void updateMusicVolume(float fVal);
- virtual void updateSystemMusicPlaying(bool isPlaying);
- virtual void updateSoundEffectVolume(float fVal);
- virtual void init(Options *);
- virtual void tick(shared_ptr<Mob> *players, float a); // 4J - updated to take array of local players rather than single one
- virtual void add(const wstring& name, File *file);
- virtual void addMusic(const wstring& name, File *file);
- virtual void addStreaming(const wstring& name, File *file);
- virtual char *ConvertSoundPathToName(const wstring& name, bool bConvertSpaces=false);
+ void play(int iSound, float x, float y, float z, float volume, float pitch) override;
+ void playStreaming(const wstring& name, float x, float y , float z, float volume, float pitch, bool bMusicDelay=true) override;
+ void playUI(int iSound, float volume, float pitch) override;
+ void playMusicTick() override;
+ void updateMusicVolume(float fVal) override;
+ void updateSystemMusicPlaying(bool isPlaying) override;
+ void updateSoundEffectVolume(float fVal) override;
+ void init(Options *) override;
+ void tick(shared_ptr<Mob> *players, float a) override; // 4J - updated to take array of local players rather than single one
+ void add(const wstring& name, File *file) override;
+ void addMusic(const wstring& name, File *file) override;
+ void addStreaming(const wstring& name, File *file) override;
+ char *ConvertSoundPathToName(const wstring& name, bool bConvertSpaces=false) override;
bool isStreamingWavebankReady(); // 4J Added
int getMusicID(int iDomain);
int getMusicID(const wstring& name);
@@ -138,7 +138,8 @@ private:
#ifdef __PS3__
int initAudioHardware(int iMinSpeakers);
#else
- int initAudioHardware(int iMinSpeakers) { return iMinSpeakers;}
+ int initAudioHardware(int iMinSpeakers) override
+ { return iMinSpeakers;}
#endif
int GetRandomishTrack(int iStart,int iEnd);