Changeset 4815:df2ef6edb97f in roaraudio for roard/driver.c


Ignore:
Timestamp:
03/27/11 20:04:27 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added support to roard for record streams.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/driver.c

    r4812 r4815  
    5050#define ROAR_DEFAULT_OSS_DEV "no default device" 
    5151#endif 
    52  { "oss", "Open Sound System", ROAR_DEFAULT_OSS_DEV, STREAM_DIR_OUT, DRV_FLAG_FHSEC, ROAR_SUBSYS_WAVEFORM, 
     52 { "oss", "Open Sound System", ROAR_DEFAULT_OSS_DEV, STREAM_DIR_BIDIR, DRV_FLAG_FHSEC, ROAR_SUBSYS_WAVEFORM, 
    5353   NULL, NULL, driver_oss_open}, 
    5454#endif 
     
    203203   } 
    204204 
     205   // if this driver does not support input we need to check if it is used in input mode. 
     206   if ( !(g_driver[i].mode & STREAM_DIR_IN) ) { 
     207    if ( sstream == NULL ) 
     208     return -1; 
     209 
     210    if ( streams_get_flag(ROAR_STREAM(sstream)->id, ROAR_FLAG_RECSOURCE) ) { 
     211     if ( streams_get_flag(ROAR_STREAM(sstream)->id, ROAR_FLAG_AUTOCONF) == 1 ) { 
     212      if ( streams_reset_flag(ROAR_STREAM(sstream)->id, ROAR_FLAG_RECSOURCE) == -1 ) 
     213       return -1; 
     214     } else { 
     215      ROAR_WARN("driver_openvio(*): driver(%s) is not abled to record data and autoconf flag is not set.", driver); 
     216      return -1; 
     217     } 
     218    } 
     219   } 
     220 
    205221   ROAR_DBG("driver_openvio(*): Opening VIO driver %s(%i)...", driver, i); 
    206222   return g_driver[i].vio_init(calls, device, info, fh, sstream); 
Note: See TracChangeset for help on using the changeset viewer.