Changeset 634:01d26682dd80 in roaraudio


Ignore:
Timestamp:
08/20/08 20:12:05 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

allow setting -1 as fh for stream, added ROAR_DIR_OUTPUT where ROAR_DIR_MONITOR is in the code

Location:
roard
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • roard/codecfilter_celt.c

    r611 r634  
    6666 if ( s->dir == ROAR_DIR_PLAY ) { 
    6767   self->decoder = celt_decoder_create(self->mode); 
    68  } else if ( s->dir == ROAR_DIR_MONITOR ) { 
     68 } else if ( s->dir == ROAR_DIR_MONITOR || s->dir == ROAR_DIR_OUTPUT ) { 
    6969   self->encoder = celt_encoder_create(self->mode); 
    7070 } else { 
  • roard/codecfilter_vorbis.c

    r602 r634  
    3838 if ( s->dir == ROAR_DIR_PLAY ) { 
    3939  return 0; 
    40  } else if ( s->dir == ROAR_DIR_MONITOR ) { 
     40 } else if ( s->dir == ROAR_DIR_MONITOR || s->dir == ROAR_DIR_OUTPUT ) { 
    4141#ifdef ROAR_HAVE_LIBVORBISENC 
    4242  // set up the encoder here 
  • roard/streams.c

    r625 r634  
    143143 } 
    144144 
     145 if ( fh == -1 ) { // yes, this is valid, indecats full vio! 
     146  return 0; 
     147 } 
     148 
    145149 dir = ROAR_STREAM(g_streams[id])->dir; 
    146150 
    147  if ( dir == ROAR_DIR_MONITOR || dir == ROAR_DIR_RECORD ) { 
     151 if ( dir == ROAR_DIR_MONITOR || dir == ROAR_DIR_RECORD || dir == ROAR_DIR_OUTPUT ) { 
    148152  shutdown(fh, SHUT_RD); 
    149153 } 
     
    629633  return 0; 
    630634 
    631  if ( s->dir != ROAR_DIR_MONITOR ) 
     635 if ( s->dir != ROAR_DIR_MONITOR && s->dir != ROAR_DIR_OUTPUT ) 
    632636  return 0; 
    633637 
Note: See TracChangeset for help on using the changeset viewer.