SDL_mixer is now entirely contained in Music.cpp.

This meant making the track vectors static, but that's kind of what we do with musicclass anyway?

In any case, this will make the transition to FAudio MUCH less invasive.
This commit is contained in:
Ethan Lee
2021-12-26 08:57:38 -05:00
parent 1eda3647ff
commit 81aa02e29b
2 changed files with 21 additions and 24 deletions

View File

@@ -15,6 +15,24 @@
/* Begin SDL_mixer wrapper */
#include <SDL_mixer.h>
#include <vector>
class MusicTrack
{
public:
MusicTrack(SDL_RWops *rw);
Mix_Music *m_music;
bool m_isValid;
};
class SoundTrack
{
public:
SoundTrack(const char* fileName);
Mix_Chunk *sound;
};
MusicTrack::MusicTrack(SDL_RWops *rw)
{
m_music = Mix_LoadMUS_RW(rw, 1);
@@ -50,6 +68,9 @@ SoundTrack::SoundTrack(const char* fileName)
}
}
static std::vector<MusicTrack> musicTracks;
static std::vector<SoundTrack> soundTracks;
/* End SDL_mixer wrapper */
musicclass::musicclass(void)