Changeset 4212:751dd56180b9 in roaraudio


Ignore:
Timestamp:
08/20/10 02:41:08 (14 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added roar_vs_role()

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/vs.h

    r4206 r4212  
    177177int     roar_vs_meta          (roar_vs_t * vss, struct roar_keyval * kv, size_t len, int * error); 
    178178 
     179/* sets the stream role 
     180 * see ../roaraudio/stream.h for possible roles 
     181 * Returns 0 on no error and -1 on error. 
     182 */ 
     183int     roar_vs_role          (roar_vs_t * vss, int role, int * error); 
     184 
    179185/* Get used connection object 
    180186 * This may be usefull if you want to use functions from the main API. 
  • libroar/vs.c

    r4206 r4212  
    684684} 
    685685 
     686int     roar_vs_role          (roar_vs_t * vss, int role, int * error) { 
     687 if ( !(vss->flags & FLAG_STREAM) ) { 
     688  _seterr(ROAR_ERROR_INVAL); 
     689  return -1; 
     690 } 
     691 
     692 _initerr(); 
     693 
     694 if ( roar_stream_set_role(vss->con, &(vss->stream), role) == -1 ) { 
     695  _seterrre(); 
     696  return -1; 
     697 } 
     698 
     699 return 0; 
     700} 
     701 
    686702struct roar_connection * roar_vs_connection_obj(roar_vs_t * vss, int * error) { 
    687703 return vss->con; 
Note: See TracChangeset for help on using the changeset viewer.