Lines Matching refs:length
20 static const int length[] = { 3, 3, 3, 3, 2, 2, 3 };
22 message_length = length[(code >> 4) - 8];
24 static const int length[] = { -1, 2, 2, 2, -1, -1, 1, 1, 1, -1,
27 message_length = length[code & 0x0f];
81 int length)
87 if (midibuf_is_full(this) || (length <= 0))
91 if (data[length - 1] == 0xfe) {
92 --length;
98 if (length > bytes_free)
99 length = bytes_free;
101 if (length > 0) {
104 if (length < length1) {
106 memcpy(this->buf + this->pos_write, data, length);
107 this->pos_write += length;
110 length2 = length - length1;
120 return length + skip_active_sense;
124 int length, int read_type)
134 if (length < 3)
142 if (length > bytes_used)
143 length = bytes_used;
162 /* check MIDI command length */
182 if (length < length1) {
184 for (i = 1; i < length; ++i)
191 length2 = length - length1;
208 if (midi_length == length)
216 if (length < midi_length)
219 length = midi_length;
222 if (length < length1) {
224 memcpy(data + repeat, this->buf + this->pos_read, length);
225 this->pos_read += length;
228 length2 = length - length1;
238 return length + repeat;
241 int line6_midibuf_ignore(struct midi_buffer *this, int length)
245 if (length > bytes_used)
246 length = bytes_used;
248 this->pos_read = (this->pos_read + length) % this->size;
250 return length;