Changeset 5226:3cb3cab29e5e in roaraudio


Ignore:
Timestamp:
11/12/11 13:20:14 (8 years ago)
Author:
phi
Branch:
default
Message:

Removed roarcat2sock as well as roar_simple_stream(), roar_simple_new_stream(), roar_simple_play(), roar_simple_monitor(), roar_simple_record(), roar_simple_filter(), roar_simple_close() and roar_simple_get_standby().

Files:
7 edited

Legend:

Unmodified
Added
Removed
  • include/libroar/simple.h

    r5225 r5226  
    4242int roar_simple_connect2(struct roar_connection * con, const char * server, const char * name, int flags, uint_least32_t timeout); 
    4343 
    44 int roar_simple_stream  (int rate, int channels, int bits, int codec, const char * server, int dir, const char * name) _LIBROAR_ATTR_DEPRECATED; 
    4544int roar_simple_stream_obj  (struct roar_stream * s, int rate, int channels, int bits, int codec, const char * server, int dir, const char * name) _LIBROAR_ATTR_DEPRECATED; 
    4645 
    4746int roar_simple_new_stream_attachexeced_obj (struct roar_connection * con, struct roar_stream * s, int rate, int channels, int bits, int codec, int dir); 
    4847 
    49 int roar_simple_new_stream (struct roar_connection * con, int rate, int channels, int bits, int codec, int dir) _LIBROAR_ATTR_DEPRECATED; 
    5048int roar_simple_new_stream_obj (struct roar_connection * con, struct roar_stream * s, int rate, int channels, int bits, int codec, int dir) _LIBROAR_ATTR_DEPRECATED; 
    5149 
    5250int roar_simple_play_file(const char * file, const char * server, const char * name); 
    5351 
    54 int roar_simple_play    (int rate, int channels, int bits, int codec, char * server, char * name) _LIBROAR_ATTR_DEPRECATED; 
    55 int roar_simple_monitor (int rate, int channels, int bits, int codec, char * server, char * name) _LIBROAR_ATTR_DEPRECATED; 
    56 int roar_simple_record  (int rate, int channels, int bits, int codec, char * server, char * name) _LIBROAR_ATTR_DEPRECATED; 
    57 int roar_simple_filter  (int rate, int channels, int bits, int codec, char * server, char * name) _LIBROAR_ATTR_DEPRECATED; 
    58  
    5952int roar_simple_connect_virtual(struct roar_connection * con, struct roar_stream * s, int parent, int dir); 
    60  
    61 int roar_simple_close(int fh) _LIBROAR_ATTR_DEPRECATED; 
    62  
    63 int roar_simple_get_standby (int fh) _LIBROAR_ATTR_DEPRECATED; 
    6453 
    6554#endif 
  • libroar/simple.c

    r5225 r5226  
    6262} 
    6363 
    64 int roar_simple_stream(int rate, int channels, int bits, int codec, const char * server, int dir, const char * name) { 
    65  struct roar_stream     s; 
    66  
    67  roar_debug_warn_sysio("roar_simple_stream", "roar_vio_simple_stream", NULL); 
    68  
    69  return roar_simple_stream_obj(&s, rate, channels, bits, codec, server, dir, name); 
    70 } 
    71  
    7264int roar_simple_stream_obj  (struct roar_stream * s, int rate, int channels, int bits, int codec, const char * server, int dir, const char * name) { 
    7365 struct roar_connection con; 
     
    7870 
    7971 if ( roar_simple_connect(&con, server, name) == -1 ) { 
    80   ROAR_DBG("roar_simple_play(*): roar_simple_connect() faild!"); 
    81   ROAR_ERR("roar_simple_stream(*): Can not connect to server"); 
     72  ROAR_DBG("roar_simple_stream_obj(*): roar_simple_connect() faild!"); 
     73  ROAR_ERR("roar_simple_stream_obj(*): Can not connect to server"); 
    8274  return -1; 
    8375 } 
     
    140132 
    141133 return fh; 
    142 } 
    143  
    144 int roar_simple_new_stream (struct roar_connection * con, int rate, int channels, int bits, int codec, int dir) { 
    145  struct roar_stream     s; 
    146  int ret; 
    147  
    148  roar_debug_warn_sysio("roar_simple_new_stream", "roar_vio_simple_new_stream_obj", NULL); 
    149  
    150  roar_libroar_nowarn(); 
    151  ret = roar_simple_new_stream_obj(con, &s, rate, channels, bits, codec, dir); 
    152  roar_libroar_warn(); 
    153  
    154  return ret; 
    155134} 
    156135 
     
    421400} 
    422401 
    423 int roar_simple_play(int rate, int channels, int bits, int codec, char * server, char * name) { 
    424  roar_debug_warn_sysio("roar_simple_play", "roar_vio_simple_stream", NULL); 
    425  
    426  return roar_simple_stream(rate, channels, bits, codec, server, ROAR_DIR_PLAY, name); 
    427 } 
    428  
    429 int roar_simple_monitor(int rate, int channels, int bits, int codec, char * server, char * name) { 
    430  roar_debug_warn_sysio("roar_simple_monitor", "roar_vio_simple_stream", NULL); 
    431  
    432  return roar_simple_stream(rate, channels, bits, codec, server, ROAR_DIR_MONITOR, name); 
    433 } 
    434  
    435 int roar_simple_record(int rate, int channels, int bits, int codec, char * server, char * name) { 
    436  roar_debug_warn_sysio("roar_simple_record", "roar_vio_simple_stream", NULL); 
    437  
    438  return roar_simple_stream(rate, channels, bits, codec, server, ROAR_DIR_RECORD, name); 
    439 } 
    440  
    441 int roar_simple_filter(int rate, int channels, int bits, int codec, char * server, char * name) { 
    442  roar_debug_warn_sysio("roar_simple_filter", "roar_vio_simple_stream", NULL); 
    443  
    444  return roar_simple_stream(rate, channels, bits, codec, server, ROAR_DIR_FILTER, name); 
    445 } 
    446  
    447402int roar_simple_connect_virtual(struct roar_connection * con, struct roar_stream * s, int parent, int dir) { 
    448403 struct roar_stream parent_stream; 
     
    473428} 
    474429 
    475 int roar_simple_close(int fh) { 
    476  roar_debug_warn_sysio("roar_simple_close", "roar_vio_close", NULL); 
    477  
    478 #ifdef ROAR_TARGET_WIN32 
    479  closesocket(fh); 
    480  return 0; 
    481 #else 
    482  
    483 #ifdef ROAR_HAVE_IO_POSIX 
    484  return close(fh); 
    485 #else 
    486  return -1; 
    487 #endif 
    488  
    489 #endif 
    490 } 
    491  
    492 int roar_simple_get_standby (int fh) { 
    493  struct roar_connection con; 
    494  
    495  roar_debug_warn_sysio("roar_simple_get_standby", "roar_get_standby", NULL); 
    496  
    497  if ( roar_connect_fh(&con, fh) == -1 ) 
    498   return -1; 
    499  
    500  return roar_get_standby(&con); 
    501 } 
    502  
    503430//ll 
  • libroaresd/esdbasic.c

    r4708 r5226  
    7171/* closes fd, previously obtained by esd_open */ 
    7272int esd_close( int esd ) { 
    73  return roar_simple_close(esd); 
     73 struct roar_vio_calls vio; 
     74 
     75 if ( roar_vio_open_fh_socket(&vio, esd) == -1 ) { 
     76  roar_err_update(); 
     77  return -1; 
     78 } 
     79 
     80 if ( roar_vio_close(&vio) == -1 ) { 
     81  roar_err_update(); 
     82  return -1; 
     83 } 
     84 
     85 return 0; 
    7486} 
    7587 
  • libroaresd/esdctl.c

    r4975 r5226  
    367367/* see if the server is in stnaby, autostandby, etc */ 
    368368esd_standby_mode_t esd_get_standby_mode( int esd ) { 
    369  return roar_simple_get_standby(esd); 
     369 struct roar_connection con; 
     370 
     371 if ( roar_connect_fh(&con, esd) == -1 ) 
     372  return -1; 
     373 
     374 return roar_get_standby(&con); 
    370375} 
    371376 
  • libroaresd/esdstream.c

    r4978 r5226  
    5050/* open a socket for playing, monitoring, or recording as a stream */ 
    5151/* the *_fallback functions try to open /dev/dsp if there's no EsounD */ 
    52 int esd_play_stream( esd_format_t format, int rate, 
    53                      const char *host, const char *name ) { 
     52 
     53static int libroaresd_stream(esd_format_t format, int rate, const char *host, const char *name, int dir) { 
    5454 int channels; 
    5555 int bits; 
    5656 int codec = ROAR_CODEC_DEFAULT; 
     57 struct roar_stream     s; 
    5758 
    5859 if ( (format & ESD_BITS16) ) { 
     
    6970 } 
    7071 
    71  return roar_simple_stream(rate, channels, bits, codec, (char*)host, ROAR_DIR_PLAY, (char*) name); 
     72 return roar_simple_stream_obj(&s, rate, channels, bits, codec, (char*)host, dir, (char*)name); 
     73} 
     74 
     75int esd_play_stream( esd_format_t format, int rate, 
     76                     const char *host, const char *name ) { 
     77 return libroaresd_stream(format, rate, host, name, ROAR_DIR_PLAY); 
    7278} 
    7379 
     
    8793int esd_monitor_stream( esd_format_t format, int rate, 
    8894                        const char *host, const char *name ) { 
    89  int channels; 
    90  int bits; 
    91  int codec = ROAR_CODEC_DEFAULT; 
    92  
    93  ROAR_DBG("esd_monitor_stream(format=%x, rate=%i, host='%s', name='%s') = ?", format, rate, host, name); 
    94  
    95  if ( (format & ESD_BITS16) ) { 
    96   bits  = 16; 
    97  } else { 
    98   bits  = 8; 
    99   codec = CODEC_DEF_8BIT; 
    100  } 
    101  
    102  if ( (format & ESD_MONO) ) { 
    103   channels = 1; 
    104  } else { 
    105   channels = 2; 
    106  } 
    107  
    108  return roar_simple_stream(rate, channels, bits, codec, (char*)host, ROAR_DIR_MONITOR, (char*)name); 
     95 return libroaresd_stream(format, rate, host, name, ROAR_DIR_MONITOR); 
    10996} 
    11097/* int esd_monitor_stream_fallback( esd_format_t format, int rate ); */ 
    11198int esd_record_stream( esd_format_t format, int rate, 
    11299                       const char *host, const char *name ) { 
    113  int channels; 
    114  int bits; 
    115  int codec = ROAR_CODEC_DEFAULT; 
    116  
    117  ROAR_DBG("esd_record_stream(format=%x, rate=%i, host='%s', name='%s') = ?", format, rate, host, name); 
    118  
    119  if ( (format & ESD_BITS16) ) { 
    120   bits  = 16; 
    121  } else { 
    122   bits  = 8; 
    123   codec = CODEC_DEF_8BIT; 
    124  } 
    125  
    126  if ( (format & ESD_MONO) ) { 
    127   channels = 1; 
    128  } else { 
    129   channels = 2; 
    130  } 
    131  
    132  return roar_simple_stream(rate, channels, bits, codec, (char*)host, ROAR_DIR_RECORD, (char*)name); 
     100 return libroaresd_stream(format, rate, host, name, ROAR_DIR_RECORD); 
    133101} 
    134102int esd_record_stream_fallback( esd_format_t format, int rate, 
     
    144112int esd_filter_stream( esd_format_t format, int rate, 
    145113                       const char *host, const char *name ) { 
    146  int channels; 
    147  int bits; 
    148  int codec = ROAR_CODEC_DEFAULT; 
    149  
    150  if ( (format & ESD_BITS16) ) { 
    151   bits  = 16; 
    152  } else { 
    153   bits  = 8; 
    154   codec = CODEC_DEF_8BIT; 
    155  } 
    156  
    157  if ( (format & ESD_MONO) ) { 
    158   channels = 1; 
    159  } else { 
    160   channels = 2; 
    161  } 
    162  
    163  return roar_simple_stream(rate, channels, bits, codec, (char*)host, ROAR_DIR_FILTER, (char*)name); 
     114 return libroaresd_stream(format, rate, host, name, ROAR_DIR_FILTER); 
    164115} 
    165116 
  • roarclients/.release-helper

    r5223 r5226  
    11#!RELEASE-HELPER:0.0beta0 
    22@RM roarcatsendfile.c 
     3@RM roarcat2sock.c 
    34#!END 
  • roarclients/Makefile

    r5223 r5226  
    99 
    1010#TARGETS_TESTS=pinentrytest zcattest pgptest pipetest polytest roarfctest 
    11 #TARGETS_OLD=roarcatad roarcat2sock roarcatpassfh roarsocktypes 
     11#TARGETS_OLD=roarcatad roarcatpassfh roarsocktypes 
    1212 
    1313TARGETS=$(TARGETS_IO) $(TARGETS_CTL) $(TARGETS_DSP) $(TARGETS_MISC) $(TARGETS_DEVEL) $(TARGETS_EXAMPLE) $(TARGETS_M) $(TARGETS_VIO) 
Note: See TracChangeset for help on using the changeset viewer.