On 10/30/2013 02:04 PM, James L. wrote:
> It is related to Active Sensing as I have an unrelease hotfix from
> CopperLAN with Active Sensing disabled, it sound fine.
> 
> A while is around 2-3 mins of MIDI songs playback
> 
> I did connected through VMidi 2 port.
> 
> Turn verbose on and set midi.winmidi.device to VMidi 2, the error keep
> printed at every 500ms with *synth\fluid_synth.c: line 1224: assertion
> `len > 0' failed*

Hmm. So in current trunk, there is this assertion on line 1234 (not
1224), which indicates that these messages somehow gets turned into
sysex messages although they should not.

I'm attaching a patch. Could you check if the patch helps against this
issue?

(If you don't know how to recompile FluidSynth, contact the person who
provided you with the FluidSynth windows binary.)

> That is with Active Sensing enabled or using version CopperLan 1.2, I
> won't find this error with Active Sensing off or using version CopperLan 1.1
> 
> In CopperLAN Manager, I have linked VMidi 1 as input to VMidi 2 as
> output, I assumed you know how to configure it.
> 
> 
> 
> 
> On Wed, Oct 30, 2013 at 4:50 PM, David Henningsson <di...@ubuntu.com
> <mailto:di...@ubuntu.com>> wrote:
> 
>     On 10/25/2013 07:09 PM, James L. wrote:
>     > Dear developers, I have no idea what is Active Sensing which I'm
>     facing
>     > an issue with Fluidsynth. Please advice.
>     >
>     > http://www.copperlan.org/forum/viewtopic.php?f=10&t=210
> 
>     Hi,
> 
>     I doubt it is directly related to Active Sensing. The Active Sensing
>     message is ignored by FluidSynth.
> 
>     I guess this is going to be difficult to track down without someone
>     taking the time to debug it thoroughly. So just a few questions:
> 
>      1) what version of FluidSynth are you using?
> 
>      2) how long is "a while" usually? (Seconds? Minutes? Hours?)
> 
>      3) how do you connect FluidSynth and CopperLan?
> 
>      4) Is it possible for you to set the synth.verbose=True option and get
>     the debug output, and if so, do the messages also stop when the
>     sound stops?
> 
>     // David
> 
> 
>     _______________________________________________
>     fluid-dev mailing list
>     fluid-dev@nongnu.org <mailto:fluid-dev@nongnu.org>
>     https://lists.nongnu.org/mailman/listinfo/fluid-dev
> 
> 
> 
> 
> _______________________________________________
> fluid-dev mailing list
> fluid-dev@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/fluid-dev
> 

diff --git a/trunk/fluidsynth/src/drivers/fluid_winmidi.c b/trunk/fluidsynth/src/drivers/fluid_winmidi.c
index 419196e..3282af5 100644
--- a/trunk/fluidsynth/src/drivers/fluid_winmidi.c
+++ b/trunk/fluidsynth/src/drivers/fluid_winmidi.c
@@ -293,12 +293,15 @@ fluid_winmidi_callback(HMIDIIN hmi, UINT wMsg, DWORD_PTR dwInstance,
     event.type = msg_type(msg_param);
     event.channel = msg_chan(msg_param);
 
-    if (event.type != PITCH_BEND) {
-      event.param1 = msg_p1(msg_param);
-      event.param2 = msg_p2(msg_param);
-    } else {  /* Pitch bend is a 14 bit value */
+    if (event.type == MIDI_SYSEX)
+      break; /* Ignore system common / system real-time messages */
+    else if (event.type == PITCH_BEND) {
+      /* Pitch bend is a 14 bit value */
       event.param1 = (msg_p2 (msg_param) << 7) | msg_p1 (msg_param);
       event.param2 = 0;
+    } else {
+      event.param1 = msg_p1(msg_param);
+      event.param2 = msg_p2(msg_param);
     }
 
     (*dev->driver.handler)(dev->driver.data, &event);
_______________________________________________
fluid-dev mailing list
fluid-dev@nongnu.org
https://lists.nongnu.org/mailman/listinfo/fluid-dev

Reply via email to