Changeset 4183:4d2d57a49246 in roaraudio


Ignore:
Timestamp:
08/14/10 16:06:54 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added functions to get connection, stream and vio object

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/vs.h

    r4172 r4183  
    8989int     roar_vs_meta          (roar_vs_t * vss, struct roar_keyval * kv, size_t len, int * error); 
    9090 
     91struct roar_connection * roar_vs_connection_obj(roar_vs_t * vss, int * error); 
     92struct roar_stream     * roar_vs_stream_obj    (roar_vs_t * vss, int * error); 
     93struct roar_vio_calls  * roar_vs_vio_obj       (roar_vs_t * vss, int * error); 
     94 
    9195#endif 
    9296 
  • libroar/vs.c

    r4182 r4183  
    501501} 
    502502 
     503struct roar_connection * roar_vs_connection_obj(roar_vs_t * vss, int * error) { 
     504 return vss->con; 
     505} 
     506 
     507struct roar_stream     * roar_vs_stream_obj    (roar_vs_t * vss, int * error) { 
     508 if ( !(vss->flags & FLAG_STREAM) ) { 
     509  _seterr(ROAR_ERROR_INVAL); 
     510  return -1; 
     511 } 
     512 
     513 return &(vss->stream); 
     514} 
     515 
     516struct roar_vio_calls  * roar_vs_vio_obj       (roar_vs_t * vss, int * error) { 
     517 if ( !(vss->flags & FLAG_STREAM) ) { 
     518  _seterr(ROAR_ERROR_INVAL); 
     519  return -1; 
     520 } 
     521 
     522 return &(vss->vio); 
     523} 
     524 
    503525//ll 
Note: See TracChangeset for help on using the changeset viewer.