Added bep file to build sdl-mixer from hg, patched native_midi cpp file that got cut off in previous patch.

This commit is contained in:
Scott McCreary
2011-04-05 20:29:12 +00:00
parent 66769e86a7
commit 569790ad6b
2 changed files with 66 additions and 0 deletions

View File

@@ -0,0 +1,27 @@
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__ */