From 230859f8f957945da7f450b83ee5db55b642b2f2 Mon Sep 17 00:00:00 2001 From: Ethan Lee Date: Sun, 26 Dec 2021 08:41:01 -0500 Subject: [PATCH] Inline SoundSystem into musicclass constructor --- desktop_version/src/Music.cpp | 9 +++------ desktop_version/src/Music.h | 7 ------- 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/desktop_version/src/Music.cpp b/desktop_version/src/Music.cpp index 1004fa04..2a278803 100644 --- a/desktop_version/src/Music.cpp +++ b/desktop_version/src/Music.cpp @@ -50,7 +50,9 @@ SoundTrack::SoundTrack(const char* fileName) } } -SoundSystem::SoundSystem(void) +/* End SDL_mixer wrapper */ + +musicclass::musicclass(void) { int audio_rate = 44100; Uint16 audio_format = AUDIO_S16SYS; @@ -62,12 +64,7 @@ SoundSystem::SoundSystem(void) vlog_error("Unable to initialize audio: %s", Mix_GetError()); SDL_assert(0 && "Unable to initialize audio!"); } -} -/* End SDL_mixer wrapper */ - -musicclass::musicclass(void) -{ safeToProcessMusic= false; m_doFadeInVol = false; m_doFadeOutVol = false; diff --git a/desktop_version/src/Music.h b/desktop_version/src/Music.h index 3b99bed2..ee640448 100644 --- a/desktop_version/src/Music.h +++ b/desktop_version/src/Music.h @@ -25,12 +25,6 @@ public: /* SDL_mixer init wrapper */ -class SoundSystem -{ -public: - SoundSystem(void); -}; - #define musicroom(rx, ry) ((rx) + ((ry) * 20)) /* The amount of "space" for the scale of the user-set volume. */ @@ -73,7 +67,6 @@ public: std::vector soundTracks; std::vector musicTracks; - SoundSystem soundSystem; bool safeToProcessMusic; int nicechange; // -1 if no song queued