Hi,

Here are two patches to solve the latest bits of bug#674731:
- Don't use running status for SYX events in MIDI file export.
- SYX events data stored when recorded from MIDI ports.

Sorry, I didn't arrive in time for 0.9.1

Regards,
Pedro

-- 
ALSA Library Bindings for Pascal
http://alsapas.alturl.com
--- sound/MidiFile.cpp.old	2003-05-31 13:13:10.000000000 +0200
+++ sound/MidiFile.cpp	2003-05-31 18:25:23.000000000 +0200
@@ -1782,7 +1782,9 @@
         {
             // Send the normal event code (with encoded channel information)
             //
-            if ((*midiEvent)->getEventCode() != eventCode)
+            // Fix for 674731 by Pedro Lopez-Cabanillas (20030531)
+            if (((*midiEvent)->getEventCode() != eventCode) ||
+                ((*midiEvent)->getEventCode() == MIDI_SYSTEM_EXCLUSIVE))
             {
                 trackBuffer += (*midiEvent)->getEventCode();
                 eventCode = (*midiEvent)->getEventCode();
--- sound/MappedEvent.h.old	2003-05-24 01:26:34.000000000 +0200
+++ sound/MappedEvent.h	2003-05-31 18:21:19.000000000 +0200
@@ -226,6 +226,7 @@
 
     // Copy constructor
     //
+    // Fix for 674731 by Pedro Lopez-Cabanillas (20030531)
     MappedEvent(const MappedEvent &mE):
         m_instrument(mE.getInstrument()),
         m_type(mE.getType()),
@@ -234,9 +235,10 @@
         m_eventTime(mE.getEventTime()),
         m_duration(mE.getDuration()),
         m_audioStartMarker(mE.getAudioStartMarker()),
-        m_dataBlock("") {;}
+        m_dataBlock(mE.getDataBlock()) {;}
 
     // Copy from pointer
+    // Fix for 674731 by Pedro Lopez-Cabanillas (20030531)
     MappedEvent(MappedEvent *mE):
         m_instrument(mE->getInstrument()),
         m_type(mE->getType()),
@@ -245,7 +247,7 @@
         m_eventTime(mE->getEventTime()),
         m_duration(mE->getDuration()),
         m_audioStartMarker(mE->getAudioStartMarker()),
-        m_dataBlock(""),
+        m_dataBlock(mE->getDataBlock()),
         m_isPersistent(false) {;}
 
     ~MappedEvent() {;}

Reply via email to