mirror of
https://github.com/kichikuou/xsystem35-sdl2.git
synced 2026-09-22 22:48:08 +03:00
Repeating SG1 with the same number is no-op
This commit is contained in:
@@ -159,7 +159,6 @@ void commandSG() {
|
||||
if (num == 0) {
|
||||
mus_midi_stop();
|
||||
} else {
|
||||
mus_midi_stop();
|
||||
mus_midi_start(num, loopcnt);
|
||||
}
|
||||
DEBUG_COMMAND("SG1 %d:\n", num);
|
||||
|
||||
@@ -67,6 +67,9 @@ static int midi_exit() {
|
||||
}
|
||||
|
||||
static int midi_start(int no, int loop, char *data, int datalen) {
|
||||
if (midino == no)
|
||||
return OK;
|
||||
|
||||
EM_ASM_ARGS({ xsystem35.midiPlayer.play($0, $1, $2); }, loop, data, datalen);
|
||||
|
||||
midino = no;
|
||||
|
||||
@@ -75,6 +75,9 @@ static int midi_exit() {
|
||||
}
|
||||
|
||||
static int midi_start(int no, int loop, char *data, int datalen) {
|
||||
if (midino == no)
|
||||
return OK;
|
||||
|
||||
midi_stop();
|
||||
|
||||
SDL_RWops *rwops = SDL_RWFromConstMem(data, datalen);
|
||||
|
||||
Reference in New Issue
Block a user