Changeset 4928:3c94809279ed in roaraudio


Ignore:
Timestamp:
05/08/11 11:40:21 (11 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

updated rsound support

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roarclients/roarinterconnect.c

    r4922 r4928  
    4949#define _HAVE_OSS 
    5050#endif 
     51 
     52#define CLIENT_NAME "roarinterconnect" 
    5153 
    5254#define MT_NONE     0x00 
     
    174176enum rsd_format para2rsdfmt (int bits, int codec) { 
    175177 switch (codec) { 
    176 /* 
    177       RSD_S16_LE = 0x0001, 
    178       RSD_S16_BE = 0x0002, 
    179       RSD_U16_LE = 0x0004, 
    180       RSD_U16_BE = 0x0008, 
    181       RSD_U8     = 0x0010, 
    182       RSD_S8     = 0x0020, 
    183       RSD_S16_NE = 0x0040, 
    184       RSD_U16_NE = 0x0080, 
    185 */ 
    186178  case ROAR_CODEC_PCM_S_LE: 
    187179    switch (bits) { 
     
    192184     case 16: return RSD_S16_LE; break; 
    193185#endif 
     186#ifdef RSD_S32_LE 
     187     case 32: return RSD_S32_LE; break; 
     188#endif 
    194189    } 
    195190   break; 
     
    202197     case 16: return RSD_S16_BE; break; 
    203198#endif 
     199#ifdef RSD_S32_BE 
     200     case 32: return RSD_S32_BE; break; 
     201#endif 
    204202    } 
    205203   break; 
     
    212210     case 16: return RSD_U16_LE; break; 
    213211#endif 
     212#ifdef RSD_U32_LE 
     213     case 32: return RSD_U32_LE; break; 
     214#endif 
    214215    } 
    215216   break; 
     
    221222#ifdef RSD_U16_BE 
    222223     case 16: return RSD_U16_BE; break; 
     224#endif 
     225#ifdef RSD_U32_BE 
     226     case 32: return RSD_U32_BE; break; 
    223227#endif 
    224228    } 
     
    314318       return 2; 
    315319    } 
    316     if ( roar_vio_simple_stream(&vio, rate, channels, bits, codec, remote, tmp, "roarinterconnect") == -1 ) { 
     320    if ( roar_vio_simple_stream(&vio, rate, channels, bits, codec, remote, tmp, CLIENT_NAME) == -1 ) { 
    317321     fprintf(stderr, "Error: can not open RoarAudio stream to %s: %s\n", remote, roar_error2str(roar_error)); 
    318322     return 2; 
     
    388392    switch (type & ST_MASK) { 
    389393     case ST_FILTER: 
    390        rfh = esd_filter_stream(tmp, rate, remote, "roarinterconnect"); 
     394       rfh = esd_filter_stream(tmp, rate, remote, CLIENT_NAME); 
    391395      break; 
    392396     case ST_TRANSMIT: 
    393        rfh = esd_play_stream(tmp, rate, remote, "roarinterconnect"); 
     397       rfh = esd_play_stream(tmp, rate, remote, CLIENT_NAME); 
    394398      break; 
    395399     case ST_RECEIVE: 
    396        rfh = esd_monitor_stream(tmp, rate, remote, "roarinterconnect"); 
     400       rfh = esd_monitor_stream(tmp, rate, remote, CLIENT_NAME); 
    397401      break; 
    398402     default: 
     
    421425       rsd_set_param(rd, RSD_SAMPLERATE, &rate); 
    422426       rsd_set_param(rd, RSD_FORMAT,     &fmt); 
     427#ifdef RSD_IDENTITY 
     428       rsd_set_param(rd, RSD_IDENTITY,   CLIENT_NAME); 
     429#endif 
    423430       rfh = rsd_exec(rd); 
    424431       if ( rfh == -1 ) { 
     
    484491 } 
    485492 
    486  if ( roar_simple_connect(con, server, "roarinterconnect") == -1 ) { 
     493 if ( roar_simple_connect(con, server, CLIENT_NAME) == -1 ) { 
    487494  fprintf(stderr, "Can not connect to local server\n"); 
    488495  return 20; 
Note: See TracChangeset for help on using the changeset viewer.