Changeset 5305:80ba5004e4e7 in roaraudio for roard
- Timestamp:
- 11/28/11 19:02:33 (12 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- roard
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/beep.c
r4708 r5305 25 25 26 26 #include "roard.h" 27 28 // TODO: FIXME: can all this VIO stuff be replaced by one call to stream_add_buffer()? 27 29 28 30 // TODO: FIXME: move them out of here into libroar: -
roard/include/midi.h
r5278 r5305 151 151 152 152 int midi_new_bufmes (struct roar_buffer ** buf, struct midi_message ** mes); 153 int midi_add_buf (int id, struct roar_buffer * buf);153 int midi_add_buf (int id, struct roar_buffer ** buf); 154 154 155 155 // bridges: -
roard/midi.c
r5302 r5305 347 347 roar_buffer_free(buf); 348 348 } else { 349 midi_add_buf(id, buf); // FIXME: don't we need error handling here?349 midi_add_buf(id, &buf); // FIXME: don't we need error handling here? 350 350 } 351 351 … … 379 379 roar_buffer_free(buf); 380 380 } else { 381 midi_add_buf(id, buf); // FIXME: don't we need error handling here?381 midi_add_buf(id, &buf); // FIXME: don't we need error handling here? 382 382 cachepos = 0; 383 383 } … … 683 683 } 684 684 685 int midi_add_buf (int id, struct roar_buffer * buf) {685 int midi_add_buf (int id, struct roar_buffer ** buf) { 686 686 #ifdef DEBUG 687 687 struct midi_message * mes; … … 689 689 #endif 690 690 691 if ( id == -1 || buf == NULL )691 if ( id == -1 || buf == NULL || *buf == NULL ) 692 692 return -1; 693 693 694 694 #ifdef DEBUG 695 if ( roar_buffer_get_data( buf, &bufdata) == -1 )695 if ( roar_buffer_get_data(*buf, &bufdata) == -1 ) 696 696 return -1; 697 697 … … 706 706 707 707 if ( g_midi_mess.buf == NULL ) { 708 g_midi_mess.buf = buf;708 g_midi_mess.buf = *buf; 709 709 } else { 710 if ( roar_buffer_moveinto(g_midi_mess.buf, &buf) == -1 ) {710 if ( roar_buffer_moveinto(g_midi_mess.buf, buf) == -1 ) { 711 711 ROAR_DBG("midi_add_buf(*) = -1"); 712 712 return -1; … … 819 819 mes->type = MIDI_TYPE_CLOCK_TICK; 820 820 821 if ( midi_add_buf(g_midi_clock.stream, buf) == -1 ) {821 if ( midi_add_buf(g_midi_clock.stream, &buf) == -1 ) { 822 822 ROAR_ERR("midi_clock_tick(void): Can not add Clock-Tick-Message"); 823 823 roar_buffer_free(buf); -
roard/raw.c
r4708 r5305 45 45 return -1; 46 46 47 // TODO: do we really need a buffer object here? wouldn't space on stack be ok? 47 48 if ( roar_buffer_new_data(&buf, RAW_READ_LEN, &data) == -1 ) 48 49 return -1; … … 56 57 57 58 if ( stream_vio_write(s->pos_rel_id, data, len) != len ) { 58 // we are thathard here as this is needed to ensure data integrety59 // we are hard here as this is needed to ensure data integrety 59 60 streams_delete(s->pos_rel_id); 60 61 }
Note: See TracChangeset
for help on using the changeset viewer.