Changeset 180:018652804998 in roaraudio


Ignore:
Timestamp:
07/20/08 01:35:36 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added some code stolen from driver.c

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/codecfilter.c

    r179 r180  
    2222} 
    2323 
     24int codecfilter_close(CODECFILTER_USERDATA_T   inst, int codecfilter) { 
     25 ROAR_DBG("codecfilter_close(inst=%p, codecfilter=%i) = ?", inst, codecfilter); 
     26 
     27 if ( codecfilter == -1 ) 
     28  return -1; 
     29 
     30 if ( g_codecfilter[codecfilter].close ) 
     31  return g_codecfilter[codecfilter].close(inst); 
     32 
     33 return 0; 
     34} 
     35 
     36int codecfilter_pause(CODECFILTER_USERDATA_T   inst, int codecfilter, int newstate) { 
     37 if ( codecfilter == -1 ) 
     38  return -1; 
     39 
     40 if ( g_codecfilter[codecfilter].pause ) 
     41  return g_codecfilter[codecfilter].pause(inst, newstate); 
     42 
     43 return 0; 
     44} 
     45 
     46int codecfilter_write(CODECFILTER_USERDATA_T   inst, int codecfilter, char * buf, int len) { 
     47 if ( codecfilter == -1 ) 
     48  return -1; 
     49 
     50 if ( g_codecfilter[codecfilter].write ) 
     51  return g_codecfilter[codecfilter].write(inst, buf, len); 
     52 
     53 return 0; 
     54} 
     55 
     56int codecfilter_read (CODECFILTER_USERDATA_T   inst, int codecfilter, char * buf, int len) { 
     57 if ( codecfilter == -1 ) 
     58  return -1; 
     59 
     60 if ( g_codecfilter[codecfilter].read ) 
     61  return g_codecfilter[codecfilter].read(inst, buf, len); 
     62 
     63 return 0; 
     64} 
     65 
     66int codecfilter_flush(CODECFILTER_USERDATA_T   inst, int codecfilter) { 
     67 if ( codecfilter == -1 ) 
     68  return -1; 
     69 
     70 if ( g_codecfilter[codecfilter].flush ) 
     71  return g_codecfilter[codecfilter].flush(inst); 
     72 
     73 return 0; 
     74} 
     75 
    2476//ll 
Note: See TracChangeset for help on using the changeset viewer.