Skip to content

Commit 1ce1cac

Browse files
committed
Fix "this.resetMusicState" in event handlers
1 parent 21fb842 commit 1ce1cac

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

music_html5.c

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ static int MusicHTML5_Open(const SDL_AudioSpec *spec)
204204
audio.currentTime = 0;
205205
audio.play();
206206
} else
207-
this.resetMusicState(audio);
207+
Module["SDL2Mixer"].resetMusicState(audio);
208208
},
209209

210210
musicError: function(e) {
@@ -215,13 +215,11 @@ static int MusicHTML5_Open(const SDL_AudioSpec *spec)
215215

216216
Module["printErr"]("Error " + audio.error.code + "; details: " + audio.error.message);
217217

218-
// Reset to defaults
219-
this.resetMusicState(audio);
218+
Module["SDL2Mixer"].resetMusicState(audio);
220219
},
221220

222221
musicInterrupted: function(e) {
223-
// Reset to defaults
224-
this.resetMusicState(e.target);
222+
Module["SDL2Mixer"].resetMusicState(e.target);
225223
}
226224
};
227225
}), html5_handle_music_stopped);

0 commit comments

Comments
 (0)