diff options
author | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2016-01-14 11:43:30 +0100 |
---|---|---|
committer | Hanspeter Portner <dev@open-music-kontrollers.ch> | 2016-01-14 11:49:43 +0100 |
commit | 170367221462adf548f6469881c6bae4e504670c (patch) | |
tree | 9ac53a7272c112841610a7ed7ea02fdc3690db4a /drivers | |
parent | 7d8204825bcfe4a8505fef8b9ce54f1e28c2d6c5 (diff) | |
download | jack1-170367221462adf548f6469881c6bae4e504670c.tar.gz |
fix 8bit netjack MIDI payload size.
MIDI payload size in 8bit netjack MIDI mode is calculated wrongly
(assumes 16bit sample size).
This bug sits at the decoding end and seems to be without concequences, as the
MIDI payload size in 8bit netjack MIDI mode at the encoding end is done
right and the decoding buffer thus cannot overflow even with a wrongly
calculated MIDI payload size.
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/netjack/netjack_packet.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/netjack/netjack_packet.c b/drivers/netjack/netjack_packet.c index 950cf4c..35b2520 100644 --- a/drivers/netjack/netjack_packet.c +++ b/drivers/netjack/netjack_packet.c @@ -1268,7 +1268,7 @@ render_payload_to_jack_ports_8bit (void *packet_payload, jack_nframes_t net_peri { // midi port, decode midi events // convert the data buffer to a standard format (uint32_t based) - unsigned int buffer_size_uint32 = net_period_down / 2; + unsigned int buffer_size_uint32 = net_period_down / 4; uint32_t * buffer_uint32 = (uint32_t*) packet_bufX; decode_midi_buffer (buffer_uint32, buffer_size_uint32, buf); } |