Changeset 3764:2a2b1eb426c4 in roaraudio for roard/midi.c
- Timestamp:
- 05/03/10 14:30:48 (14 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
roard/midi.c
r3594 r3764 157 157 } 158 158 159 if ( roar_buffer_new (&b, MIDI_READ_SIZE) == -1 ) {159 if ( roar_buffer_new_data(&b, MIDI_READ_SIZE, (void**)&buf) == -1 ) { 160 160 ROAR_ERR("midi_check_stream(*): Can not alloc buffer space!"); 161 161 ROAR_DBG("midi_check_stream(*) = -1"); 162 162 return -1; 163 163 } 164 165 roar_buffer_get_data(b, (void **)&buf);166 164 167 165 if ( (len = stream_vio_s_read(ss, buf, MIDI_READ_SIZE)) < 1 ) { … … 480 478 *buf = (void*)(*mes = NULL); 481 479 482 if ( roar_buffer_new(buf, sizeof(struct midi_message)) == -1 ) 483 return -1; 484 485 if ( roar_buffer_get_data(*buf, (void**)mes) == -1 ) { 486 roar_buffer_free(*buf); 480 if ( roar_buffer_new_data(buf, sizeof(struct midi_message), (void**)mes) == -1 ) { 487 481 *buf = (void*)(*mes = NULL); 488 482 return -1;
Note: See TracChangeset
for help on using the changeset viewer.