Changeset 4537:31479869dddd in roaraudio


Ignore:
Timestamp:
10/23/10 12:37:00 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

deligate handling of ROAR_FLAG_SINGLESINK to subfunction

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/include/streams.h

    r4521 r4537  
    153153int streams_set_sync     (int id, int sync); 
    154154int streams_set_mmap     (int id, int reset); 
     155int streams_set_single_sink(int id, int reset); 
    155156int streams_set_flag     (int id, int flag); 
    156157int streams_set_rawflag  (int id, int flag); 
  • roard/streams.c

    r4521 r4537  
    776776} 
    777777 
     778int streams_set_single_sink(int id, int reset) { 
     779 _CHECK_SID(id); 
     780 
     781 return -1; 
     782} 
     783 
    778784int streams_set_flag     (int id, int flag) { 
    779785 int parent; 
     
    791797  streams_set_primary(id, 1); 
    792798  flag -= ROAR_FLAG_PRIMARY; 
     799 } 
     800 
     801 if ( flag & ROAR_FLAG_SINGLESINK ) { 
     802  if ( streams_set_single_sink(id, 0) == -1 ) 
     803   flag -= ROAR_FLAG_SINGLESINK; 
    793804 } 
    794805 
     
    878889  streams_set_primary(id, 0); 
    879890  flag -= ROAR_FLAG_PRIMARY; 
     891 } 
     892 
     893 if ( flag & ROAR_FLAG_SINGLESINK ) { 
     894  if ( streams_set_single_sink(id, 1) == -1 ) 
     895   flag -= ROAR_FLAG_SINGLESINK; 
    880896 } 
    881897 
Note: See TracChangeset for help on using the changeset viewer.