Files
haikuports/media-libs/sdl-mixer/patches/sdl-mixer-1.2-hg.patch

28 lines
712 B
Diff

diff -r 4b699c9a269d native_midi/native_midi_haiku.cpp
--- a/native_midi/native_midi_haiku.cpp Mon Mar 21 16:54:59 2011 -0700
+++ b/native_midi/native_midi_haiku.cpp Tue Apr 05 11:32:08 2011 +0000
@@ -259,3 +259,23 @@
currentSong = song;
}
void native_midi_stop()
+{
+ if (currentSong == NULL) return;
+ currentSong->store->Stop();
+ currentSong->store->Disconnect(&synth);
+ while (currentSong->store->IsPlaying())
+ usleep(1000);
+ currentSong = NULL;
+}
+int native_midi_active()
+{
+ if (currentSong == NULL) return 0;
+ return currentSong->store->CurrentEvent() < currentSong->store->CountEvents();
+}
+
+const char* native_midi_error(void)
+{
+ return lasterr;
+}
+
+#endif /* __HAIKU__ */