Lines Matching full:length

19 		static const int length[] = { 3, 3, 3, 3, 2, 2, 3 };  in midibuf_message_length()  local
21 message_length = length[(code >> 4) - 8]; in midibuf_message_length()
28 static const int length[] = { -1, 2, -1, 2, -1, -1, 1, 1, 1, 1, in midibuf_message_length() local
31 message_length = length[code & 0x0f]; in midibuf_message_length()
85 int length) in line6_midibuf_write() argument
91 if (midibuf_is_full(this) || (length <= 0)) in line6_midibuf_write()
95 if (data[length - 1] == 0xfe) { in line6_midibuf_write()
96 --length; in line6_midibuf_write()
102 if (length > bytes_free) in line6_midibuf_write()
103 length = bytes_free; in line6_midibuf_write()
105 if (length > 0) { in line6_midibuf_write()
108 if (length < length1) { in line6_midibuf_write()
110 memcpy(this->buf + this->pos_write, data, length); in line6_midibuf_write()
111 this->pos_write += length; in line6_midibuf_write()
114 length2 = length - length1; in line6_midibuf_write()
124 return length + skip_active_sense; in line6_midibuf_write()
128 int length) in line6_midibuf_read() argument
138 if (length < 3) in line6_midibuf_read()
146 if (length > bytes_used) in line6_midibuf_read()
147 length = bytes_used; in line6_midibuf_read()
151 /* check MIDI command length */ in line6_midibuf_read()
173 if (length < length1) { in line6_midibuf_read()
175 for (i = 1; i < length; ++i) in line6_midibuf_read()
182 length2 = length - length1; in line6_midibuf_read()
199 if (midi_length == length) in line6_midibuf_read()
207 if (length < midi_length) in line6_midibuf_read()
210 length = midi_length; in line6_midibuf_read()
213 if (length < length1) { in line6_midibuf_read()
215 memcpy(data + repeat, this->buf + this->pos_read, length); in line6_midibuf_read()
216 this->pos_read += length; in line6_midibuf_read()
219 length2 = length - length1; in line6_midibuf_read()
229 return length + repeat; in line6_midibuf_read()
232 int line6_midibuf_ignore(struct midi_buffer *this, int length) in line6_midibuf_ignore() argument
236 if (length > bytes_used) in line6_midibuf_ignore()
237 length = bytes_used; in line6_midibuf_ignore()
239 this->pos_read = (this->pos_read + length) % this->size; in line6_midibuf_ignore()
241 return length; in line6_midibuf_ignore()