Changeset 1158:2a018971489b in roaraudio for libroar/simple.c


Ignore:
Timestamp:
01/23/09 22:03:26 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added roar_simple_stream_obj()

File:
1 edited

Legend:

Unmodified
Added
Removed
  • libroar/simple.c

    r1094 r1158  
    5858 
    5959int roar_simple_stream(int rate, int channels, int bits, int codec, char * server, int dir, char * name) { 
     60 struct roar_stream     s; 
     61 
     62 return roar_simple_stream_obj(&s, rate, channels, bits, codec, server, dir, name); 
     63} 
     64 
     65int roar_simple_stream_obj  (struct roar_stream * s, int rate, int channels, int bits, int codec, char * server, int dir, char * name) { 
    6066 struct roar_connection con; 
    61  struct roar_stream     s; 
    6267 
    6368 if ( roar_simple_connect(&con, server, name) == -1 ) { 
     
    6772 } 
    6873 
    69  if ( roar_stream_new(&s, rate, channels, bits, codec) == -1 ) { 
     74 if ( roar_stream_new(s, rate, channels, bits, codec) == -1 ) { 
    7075  roar_disconnect(&con); 
    7176  return -1; 
    7277 } 
    7378 
    74  if ( roar_stream_connect(&con, &s, dir) == -1 ) { 
     79 if ( roar_stream_connect(&con, s, dir) == -1 ) { 
    7580  roar_disconnect(&con); 
    7681  return -1; 
    7782 } 
    7883 
    79  if ( roar_stream_exec(&con, &s) == -1 ) { 
     84 if ( roar_stream_exec(&con, s) == -1 ) { 
    8085  roar_disconnect(&con); 
    8186  return -1; 
Note: See TracChangeset for help on using the changeset viewer.