lfs, current build
This commit is contained in:
1 parent
2efed2a443
commit
a5904b917b
397 files changed
+215918
-2458
No files matched your search
@@ -166,14 +166,16 @@ namespace game::resource
|
||||
|
||||
void Audio::play(bool isLoop) const
|
||||
{
|
||||
if (!internal) return;
|
||||
auto audio = internal;
|
||||
if (!audio) return;
|
||||
|
||||
auto mixer = mixer_get();
|
||||
if (!mixer) return;
|
||||
|
||||
if (track && MIX_GetTrackMixer(track) != mixer)
|
||||
if (!isLoop)
|
||||
{
|
||||
MIX_DestroyTrack(track);
|
||||
track = nullptr;
|
||||
MIX_PlayAudio(mixer, audio.get());
|
||||
return;
|
||||
}
|
||||
|
||||
if (!track)
|
||||
@@ -182,7 +184,7 @@ namespace game::resource
|
||||
if (!track) return;
|
||||
}
|
||||
|
||||
MIX_SetTrackAudio(track, internal.get());
|
||||
if (!MIX_SetTrackAudio(track, audio.get())) return;
|
||||
|
||||
SDL_PropertiesID options = 0;
|
||||
|
||||
|
||||
Reference in new issue
Block a user