mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-06 06:58:57 +02:00
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:
27
media-libs/sdl-mixer/patches/sdl-mixer-1.2-hg.patch
Normal file
27
media-libs/sdl-mixer/patches/sdl-mixer-1.2-hg.patch
Normal 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__ */
|
||||
Reference in New Issue
Block a user