Changeset 4521:4277b6a0c8a1 in roaraudio for roard/midi.c
- Timestamp:
- 10/16/10 17:09:23 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/midi.c
r3764 r4521 136 136 struct roar_stream_server * ss; 137 137 struct roar_buffer * b; 138 char* buf;138 void * buf; 139 139 ssize_t len; 140 140 … … 157 157 } 158 158 159 if ( roar_buffer_new_data(&b, MIDI_READ_SIZE, (void**)&buf) == -1 ) {159 if ( roar_buffer_new_data(&b, MIDI_READ_SIZE, &buf) == -1 ) { 160 160 ROAR_ERR("midi_check_stream(*): Can not alloc buffer space!"); 161 161 ROAR_DBG("midi_check_stream(*) = -1"); … … 213 213 214 214 int midi_conv_midi2mes (int id) { 215 void * bufdata; 215 216 unsigned char * data; 216 217 struct roar_stream * s; … … 229 230 230 231 while (ss->buffer != NULL && alive) { 231 if ( roar_buffer_get_data(ss->buffer, (void**)&data) == -1 ) {232 if ( roar_buffer_get_data(ss->buffer, &bufdata) == -1 ) { 232 233 alive = 0; 233 234 continue; 234 235 } 236 237 data = bufdata; 235 238 236 239 if ( roar_buffer_get_len(ss->buffer, &have) == -1 ) { … … 375 378 struct roar_buffer * buf = g_midi_mess.buf; 376 379 struct midi_message * mes = NULL; 380 void * bufdata; 377 381 unsigned char data[3]; 378 382 unsigned char * d; … … 390 394 391 395 while (buf != NULL) { 392 if ( roar_buffer_get_data(buf, (void**)&mes) == -1 ) {396 if ( roar_buffer_get_data(buf, &bufdata) == -1 ) { 393 397 return -1; 394 398 } 399 400 mes = bufdata; 395 401 396 402 if (mes->type == MIDI_TYPE_CLOCK_TICK || mes->type == MIDI_TYPE_CLOCK_START || mes->type == MIDI_TYPE_CLOCK_STOP ) { … … 455 461 struct roar_buffer * buf = g_midi_mess.buf; 456 462 struct midi_message * mes = NULL; 463 void * bufdata; 457 464 458 465 while (buf != NULL) { 459 if ( roar_buffer_get_data(buf, (void**)&mes) == -1 ) {466 if ( roar_buffer_get_data(buf, &bufdata) == -1 ) { 460 467 return -1; 461 468 } 469 470 mes = bufdata; 462 471 463 472 if ( ssynth_eval_message(mes) == -1 ) … … 492 501 int midi_add_buf (int id, struct roar_buffer * buf) { 493 502 struct midi_message * mes; 503 void * bufdata; 494 504 495 505 if ( id == -1 || buf == NULL ) 496 506 return -1; 497 507 498 if ( roar_buffer_get_data(buf, (void**)&mes) == -1 ) 499 return -1; 508 if ( roar_buffer_get_data(buf, &bufdata) == -1 ) 509 return -1; 510 511 mes = bufdata; 500 512 501 513 ROAR_DBG("midi_add_buf(id=%i, buf=%p) = ?", id, buf); … … 803 815 struct roar_buffer * buf = g_midi_mess.buf; 804 816 struct midi_message * mes = NULL; 817 void * bufdata; 805 818 806 819 ROAR_DBG("midi_cb_readbuf(void) = ?"); … … 809 822 ROAR_DBG("midi_cb_readbuf(void): buf=%p", buf); 810 823 811 if ( roar_buffer_get_data(buf, (void**)&mes) == -1 ) {824 if ( roar_buffer_get_data(buf, &bufdata) == -1 ) { 812 825 return -1; 813 826 } 827 828 mes = bufdata; 814 829 815 830 switch (mes->type) {
Note: See TracChangeset
for help on using the changeset viewer.