Changeset 119:8669a32c3bdd in roaraudio


Ignore:
Timestamp:
07/13/08 14:54:17 (16 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added a way to get the roar_stream object when using roar_simple_new_stream*()

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/simple.h

    r82 r119  
    1111 
    1212int roar_simple_new_stream (struct roar_connection * con, int rate, int channels, int bits, int codec, int dir); 
     13int roar_simple_new_stream_obj (struct roar_connection * con, struct roar_stream * s, int rate, int channels, int bits, int 
     14codec, int dir); 
    1315 
    1416int roar_simple_play    (int rate, int channels, int bits, int codec, char * server, char * name); 
  • libroar/simple.c

    r82 r119  
    6060int roar_simple_new_stream (struct roar_connection * con, int rate, int channels, int bits, int codec, int dir) { 
    6161 struct roar_stream     s; 
     62 return roar_simple_new_stream_obj(con, &s, rate, channels, bits, codec, dir); 
     63} 
     64 
     65int roar_simple_new_stream_obj (struct roar_connection * con, struct roar_stream * s, int rate, int channels, int bits, int codec, int dir) { 
    6266 struct roar_message    mes; 
    6367 char file[80]; 
     
    7175 } 
    7276 
    73  if ( roar_stream_new(&s, rate, channels, bits, codec) == -1 ) { 
     77 if ( roar_stream_new(s, rate, channels, bits, codec) == -1 ) { 
    7478  return -1; 
    7579 } 
    7680 
    77  if ( roar_stream_connect(con, &s, dir) == -1 ) { 
     81 if ( roar_stream_connect(con, s, dir) == -1 ) { 
    7882  return -1; 
    7983 } 
    8084 
    81  if ( roar_stream_connect_to_ask(con, &s, ROAR_SOCKET_TYPE_UNIX, file, 0) != -1 ) { 
     85 if ( roar_stream_connect_to_ask(con, s, ROAR_SOCKET_TYPE_UNIX, file, 0) != -1 ) { 
    8286 
    8387  if ( (fh = accept(listen, NULL, NULL)) != -1 ) { 
Note: See TracChangeset for help on using the changeset viewer.