Changeset 2415:9bf731990e80 in roaraudio


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

added streams_get_subsys()

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/include/streams.h

    r2288 r2415  
    9595int streams_get_dir    (int id); 
    9696 
     97int streams_get_subsys (int id); 
     98 
    9799int streams_set_fh     (int id, int fh); 
    98100int streams_get_fh     (int id); 
  • roard/streams.c

    r2414 r2415  
    277277} 
    278278 
     279int streams_get_subsys (int id) { 
     280 struct roar_stream_server * ss; 
     281 
     282 if ( (ss = g_streams[id]) == NULL ) 
     283  return -1; 
     284 
     285 switch (ROAR_STREAM(ss)->dir) { 
     286  case ROAR_DIR_PLAY: 
     287  case ROAR_DIR_RECORD: 
     288  case ROAR_DIR_MONITOR: 
     289  case ROAR_DIR_FILTER: 
     290  case ROAR_DIR_OUTPUT: 
     291  case ROAR_DIR_BIDIR: 
     292    return ROAR_SUBSYS_WAVEFORM; 
     293   break; 
     294  case ROAR_DIR_MIDI_IN: 
     295  case ROAR_DIR_MIDI_OUT: 
     296    return ROAR_SUBSYS_MIDI; 
     297   break; 
     298  case ROAR_DIR_LIGHT_IN: 
     299  case ROAR_DIR_LIGHT_OUT: 
     300    return ROAR_SUBSYS_LIGHT; 
     301   break; 
     302  case ROAR_DIR_RAW_IN: 
     303  case ROAR_DIR_RAW_OUT: 
     304    return ROAR_SUBSYS_RAW; 
     305   break; 
     306  case ROAR_DIR_THRU: 
     307    return streams_get_subsys(ROAR_STREAM(ss)->pos_rel_id); 
     308   break; 
     309 } 
     310 
     311 return -1; 
     312} 
     313 
    279314int streams_set_fh     (int id, int fh) { 
    280315 struct roar_stream_server * ss; 
Note: See TracChangeset for help on using the changeset viewer.