Changeset 2416:9e27075230e1 in roaraudio


Ignore:
Timestamp:
08/18/09 04:19:19 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

update all other streams in case passmixer is set

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/streams.c

    r2415 r2416  
    615615int streams_set_mixer    (int id) { 
    616616 struct roar_stream_server * ss; 
     617 struct roar_stream_server * pmss; 
     618 int i; 
     619 int subsys; 
    617620 
    618621 if ( (ss = g_streams[id]) == NULL ) 
    619622  return -1; 
     623 
     624 if ( streams_get_flag(id, ROAR_FLAG_PASSMIXER) == 1 ) { 
     625  if ( (subsys = streams_get_subsys(id)) == -1 ) 
     626   return -1; 
     627 
     628  for (i = 0; i < ROAR_STREAMS_MAX; i++) { 
     629   if ( (pmss = g_streams[i]) != NULL ) { 
     630    if ( streams_get_flag(i, ROAR_FLAG_PASSMIXER) == 1 ) { 
     631     if ( streams_get_subsys(i) == subsys ) { 
     632      memcpy(&(pmss->mixer), &(ss->mixer), sizeof(struct roar_mixer_settings)); 
     633 
     634      // update hwmixers and the like but do not set mixer value recrusivly. 
     635      streams_reset_flag(i, ROAR_FLAG_PASSMIXER); 
     636      streams_set_mixer(i); 
     637      streams_set_flag(i, ROAR_FLAG_PASSMIXER); 
     638     } 
     639    } 
     640   } 
     641  } 
     642 } 
    620643 
    621644 if ( !streams_get_flag(id, ROAR_FLAG_HWMIXER) ) 
Note: See TracChangeset for help on using the changeset viewer.