From: Wim Taymans Date: Thu, 21 Mar 2013 17:17:40 +0000 (+0100) Subject: fluidsynth: improve debug X-Git-Tag: 1.19.3~507^2~13936 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a6e5a26be2259605317ec6a29ea217b5a1b95392;p=platform%2Fupstream%2Fgstreamer.git fluidsynth: improve debug --- diff --git a/ext/fluidsynth/gstfluidsynth.c b/ext/fluidsynth/gstfluidsynth.c index a62515c..3f6b0c1 100644 --- a/ext/fluidsynth/gstfluidsynth.c +++ b/ext/fluidsynth/gstfluidsynth.c @@ -275,23 +275,24 @@ static void handle_buffer (GstFluidsynth * fluidsynth, GstBuffer * buffer) { GstMapInfo info; - guint8 event, channel; + guint8 event; gst_buffer_map (buffer, &info, GST_MAP_READ); event = info.data[0]; - channel = event & 0x0f; - - GST_DEBUG_OBJECT (fluidsynth, "event 0x%02x channel %d", event, channel); switch (event & 0xf0) { case 0xf0: switch (event) { case 0xff: + GST_DEBUG_OBJECT (fluidsynth, "system reset"); fluid_synth_system_reset (fluidsynth->synth); break; case 0xf0: case 0xf7: + GST_DEBUG_OBJECT (fluidsynth, "sysex 0x%02x", event); + GST_MEMDUMP_OBJECT (fluidsynth, "bytes ", info.data + 1, + info.size - 1); fluid_synth_sysex (fluidsynth->synth, (char *) info.data + 1, info.size - 1, NULL, NULL, NULL, 0); @@ -303,11 +304,16 @@ handle_buffer (GstFluidsynth * fluidsynth, GstBuffer * buffer) break; default: { - guint8 p1, p2; + guint8 channel, p1, p2; + + channel = event & 0x0f; p1 = info.size > 1 ? info.data[1] & 0x7f : 0; p2 = info.size > 2 ? info.data[2] & 0x7f : 0; + GST_DEBUG_OBJECT (fluidsynth, "event 0x%02x channel %d, 0x%02x 0x%02x", + event, channel, p1, p2); + switch (event & 0xf0) { case 0x80: fluid_synth_noteoff (fluidsynth->synth, channel, p1);