music_nativemidi.c
changeset 797 b4b6adff699a
parent 784 5cb894f15335
child 848 3907db698eb5
     1.1 --- a/music_nativemidi.c	Fri Oct 20 21:55:03 2017 -0700
     1.2 +++ b/music_nativemidi.c	Fri Oct 20 23:39:04 2017 -0700
     1.3 @@ -36,10 +36,14 @@
     1.4      return music;
     1.5  }
     1.6  
     1.7 -static int NATIVEMIDI_Play(void *context)
     1.8 +static int NATIVEMIDI_Play(void *context, int play_count)
     1.9  {
    1.10      NativeMidiSong *music = (NativeMidiSong *)context;
    1.11 -    native_midi_start(music, music_loops);
    1.12 +    int loops = play_count;
    1.13 +    if (loops > 0) {
    1.14 +        --loops;
    1.15 +    }
    1.16 +    native_midi_start(music, loops);
    1.17      return 0;
    1.18  }
    1.19