Changeset 1879:6f1ac40aae5d in roaraudio


Ignore:
Timestamp:
05/23/09 18:32:25 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

restore partical input buffer

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/midi.c

    r1878 r1879  
    167167 struct roar_buffer        * buf = NULL; 
    168168 struct midi_message       * mes = NULL; 
    169  size_t need = 0, have = 0; 
     169 size_t need = 0, have = 0, last_have = 0, old_have = 0; 
    170170 int alive = 1; 
    171171 
     
    187187   continue; 
    188188  } 
     189  old_have = have; 
    189190 
    190191  while (have && alive) { 
     
    194195     buf = NULL; 
    195196    } 
     197 
     198    last_have = have; 
    196199 
    197200    need = 0; 
     
    268271 
    269272  if ( need ) { 
    270    ROAR_ERR("midi_conv_midi2mes(*): FIXME: BUG!!! Need to restore buffer here with corrected length"); 
     273   if ( roar_buffer_set_offset(ss->buffer, old_have - last_have) == -1 ) { 
     274    ROAR_ERR("midi_conv_midi2mes(*): FIXME: BUG!!! Need to restore buffer here with corrected length"); 
     275   } 
    271276  } else if ( !have ) { 
    272277   roar_buffer_next(&(ss->buffer)); 
Note: See TracChangeset for help on using the changeset viewer.