Changeset 3215:13678c1774be in roaraudio


Ignore:
Timestamp:
01/24/10 06:03:06 (12 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

reset mixer stream in case a mixer comes up

Location:
roard
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • roard/light.c

    r2959 r3215  
    2929int light_init  (unsigned int channels) { 
    3030 struct roar_stream_server * ss; 
     31 int i; 
    3132 
    3233 g_light_state.channels = 0; 
     
    5455 ROAR_STREAM(ss)->info.bits  = ROAR_LIGHT_BITS; 
    5556 ROAR_STREAM(ss)->info.rate  = ROAR_OUTPUT_CFREQ; 
     57 
     58 for (i = 0; i < ROAR_STREAMS_MAX; i++) { 
     59  if ( g_streams[i] != NULL ) { 
     60   if ( streams_get_subsys(i) == ROAR_SUBSYS_LIGHT ) { 
     61    streams_set_mixer_stream(i, g_light_mixer.stream); 
     62   } 
     63  } 
     64 } 
    5665 
    5766 return light_reset(); 
  • roard/midi.c

    r2943 r3215  
    4545int midi_init (void) { 
    4646 struct roar_stream_server * ss; 
     47 int i; 
    4748 
    4849 midi_config.inited = 0; 
     
    6970 } 
    7071 ss->state = ROAR_STREAMSTATE_OLD; 
     72 
     73 for (i = 0; i < ROAR_STREAMS_MAX; i++) { 
     74  if ( g_streams[i] != NULL ) { 
     75   if ( streams_get_subsys(i) == ROAR_SUBSYS_MIDI ) { 
     76    streams_set_mixer_stream(i, g_midi_mixer.stream); 
     77   } 
     78  } 
     79 } 
    7180 
    7281 midi_config.inited |= MIDI_INITED_MAIN; 
  • roard/waveform.c

    r2949 r3215  
    2828 struct roar_stream_server * ss; 
    2929 struct roar_stream        *  s; 
     30 int                          i; 
    3031 
    3132 if ( (g_waveform_mixer.stream = add_mixer(ROAR_SUBSYS_WAVEFORM, _MIXER_NAME("Waveform"), &ss)) == -1 ) 
     
    3940 
    4041 ss->state = ROAR_STREAMSTATE_OLD; 
     42 
     43 for (i = 0; i < ROAR_STREAMS_MAX; i++) { 
     44  if ( g_streams[i] != NULL ) { 
     45   if ( streams_get_subsys(i) == ROAR_SUBSYS_WAVEFORM ) { 
     46    streams_set_mixer_stream(i, g_waveform_mixer.stream); 
     47   } 
     48  } 
     49 } 
    4150 
    4251 return 0; 
Note: See TracChangeset for help on using the changeset viewer.