mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 14:38:51 +02:00
28 lines
712 B
Diff
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__ */
|