Changeset 4969:d0b8acb5121f in roaraudio


Ignore:
Timestamp:
05/16/11 12:11:55 (13 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

Added support for OpenBSD sndio's new TCP connection syntax.

Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ChangeLog

    r4962 r4969  
    1212        * Added simple memmgr (memory Manager) code. 
    1313        * Updated libroarpulse, includes converting libroarpulse-simple to VS API. 
     14        * Added support for OpenBSD sndio's new TCP connection syntax. 
    1415 
    1516v. 0.4beta5 - Tue Apr 26 2011 08:42 CEST 
  • libroar.ckport

    r4906 r4969  
    77roar_cdrom_run_cdparanoia       unknown 
    88roar_vio_open_get_cookie        unknown 
    9 _ROAR_MLOCK                     internal 
    10 _roardl2ldl                     internal 
     9roar_reset                      wip     Do not use yet 
    1110 
    1211# VIO: 
     12roar_vio_clear_calls            ok 
     13 
    1314roar_vio_close                  ok 
    1415 
     
    154155roar_vio_cmd_ctl                internal 
    155156 
    156 roar_vio_open_gzip              wip     Currently requires cmd vio 
     157roar_vio_open_gzip              legacy  Use roar_vio_open_zlib 
     158 
    157159roar_vio_open_gpg               wip     Currently requires cmd vio 
    158160roar_vio_open_pgp_decrypt       wip     Currently requires cmd vio 
     
    297299roar_vio_open_misc              ok 
    298300roar_vio_open_misc_by_name      ok 
     301 
     302# VIO zlib: 
     303roar_vio_open_zlib              ok 
     304 
     305roar_vio_zlib_close             internal 
     306roar_vio_zlib_ctl               internal 
     307roar_vio_zlib_lseek             internal 
     308roar_vio_zlib_nonblock          internal 
     309roar_vio_zlib_read              internal 
     310roar_vio_zlib_sync              internal 
     311roar_vio_zlib_write             internal 
     312 
     313_set_error                      internal 
     314_zalloc                         internal 
     315_zfree                          internal 
    299316 
    300317# Buffer: 
     
    364381roar_client_set_proto           ok 
    365382roar_client_pass                ok 
     383roar_client_exec                ok 
    366384 
    367385# Streams: 
     
    578596 
    579597# MemMgr: 
    580 roar_mm_calloc                  wip 
    581 roar_mm_malloc                  wip 
    582 roar_mm_free                    wip 
    583 roar_mm_realloc                 wip 
    584 roar_mm_strdup                  wip 
     598roar_mm_calloc                  ok 
     599roar_mm_malloc                  ok 
     600roar_mm_free                    ok 
     601roar_mm_realloc                 ok 
    585602roar_mm_memdup                  ok 
     603roar_mm_strdup                  ok 
     604roar_mm_strndup                 ok 
     605roar_mm_strlen                  ok 
     606roar_mm_strnlen                 ok 
     607 
     608roar_mm_mlock                   ok 
     609roar_mm_munlock                 ok 
     610 
     611_ROAR_MLOCK                     legacy  Use roar_mm_mlock 
    586612 
    587613# Meta Data: 
     
    631657roar_dl_ra_init                 ok 
    632658roar_dl_errstr                  ok 
     659 
     660_roardl2ldl                     internal 
    633661 
    634662# RoarSLP: 
     
    889917# Timing stuff: 
    890918roar_usleep                     ok 
     919roar_sleep                      ok 
    891920 
    892921!TARGET: libroardsp0 
  • libroarsndio/libroarsndio.c

    r4708 r4969  
    7171 } 
    7272 
    73  if ( (optsoffset = strstr(unitoffset, ".")) != NULL ) { 
     73 if ( (optsoffset = strstr(unitoffset, "/")) != NULL ) { 
     74  *optsoffset = 0; 
     75  return unitoffset; 
     76 } else if ( (optsoffset = strstr(unitoffset, ".")) != NULL ) { 
    7477  // TODO: add some code to strip the options of the end 
    7578  return name; 
     
    103106 struct sio_hdl * hdl = NULL; 
    104107 int is_midi = 0; 
     108 char * tmp; 
    105109 
    106110 if ( (hdl = roar_mm_malloc(sizeof(struct sio_hdl))) == NULL ) 
     
    108112 
    109113 memset(hdl, 0, sizeof(struct sio_hdl)); 
     114 hdl->device = NULL; 
    110115 
    111116 switch (mode) { 
     
    113118    hdl->dir = ROAR_DIR_PLAY; 
    114119   break; 
     120  case SIO_REC: 
     121    hdl->dir = ROAR_DIR_PLAY; 
     122   break; 
    115123  case MIO_OUT: 
    116124    is_midi = 1; 
     
    123131 
    124132  // unsupported: 
    125   case SIO_REC: 
    126133  case SIO_PLAY|SIO_REC: 
    127134  case MIO_OUT|MIO_IN: 
     
    141148 } 
    142149 
    143  name = sndio_to_roar_names((char*) name); 
    144  
    145  if ( roar_simple_connect(&(hdl->con), (char*) name, "libroarsndio") == -1 ) { 
     150 if ( name != NULL ) { 
     151  tmp = roar_mm_strdup(name); 
     152  name = sndio_to_roar_names(tmp); 
     153 
     154  if ( name != NULL ) 
     155   hdl->device = roar_mm_strdup(name); 
     156 
     157  roar_mm_free(tmp); 
     158 } 
     159 
     160 if ( roar_simple_connect(&(hdl->con), hdl->device, "libroarsndio") == -1 ) { 
     161  roar_mm_free(hdl->device); 
    146162  roar_mm_free(hdl); 
    147163  return NULL; 
     
    151167 
    152168 hdl->stream_opened = 0; 
    153  
    154  if ( name != NULL ) 
    155   hdl->device = strdup(name); 
    156169 
    157170 if ( is_midi ) { 
     
    179192 roar_disconnect(&(hdl->con)); 
    180193 
     194 if ( hdl->device != NULL ) 
     195  roar_mm_free(hdl->device); 
    181196 roar_mm_free(hdl); 
    182197} 
Note: See TracChangeset for help on using the changeset viewer.