Changeset 1909:5693a37bf8f4 in roaraudio


Ignore:
Timestamp:
05/26/09 13:34:34 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

only send clock on outputs if sync flag is set

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/midi.c

    r1898 r1909  
    323323 unsigned char             * d; 
    324324 int                         len; 
     325 int                         send_clock; 
    325326 
    326327 if ( g_streams[id] == NULL ) 
     
    330331 
    331332 s = ROAR_STREAM(ss = g_streams[id]); 
     333 
     334 send_clock = streams_get_flag(id, ROAR_FLAG_SYNC); 
    332335 
    333336 while (buf != NULL) { 
     
    337340 
    338341  if (mes->type == MIDI_TYPE_CLOCK_TICK || mes->type == MIDI_TYPE_CLOCK_START || mes->type == MIDI_TYPE_CLOCK_STOP ) { 
    339    if ( stream_vio_s_write(ss, &(mes->type), 1) != 1 ) { 
    340     streams_delete(id); 
    341     return -1; 
     342   if ( send_clock ) 
     343    if ( stream_vio_s_write(ss, &(mes->type), 1) != 1 ) { 
     344     streams_delete(id); 
     345     return -1; 
     346    } 
    342347   } 
    343348 
Note: See TracChangeset for help on using the changeset viewer.