Changeset 2017:419fb879b9e3 in roaraudio


Ignore:
Timestamp:
06/19/09 16:25:43 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

added support to annouce a location

Location:
roard
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • roard/include/roard.h

    r1993 r2017  
    124124  int                        mixer_channels; 
    125125 } streams[ROAR_DIR_DIRIDS]; 
     126 char * location; 
    126127} * g_config; 
    127128 
  • roard/roard.c

    r2016 r2017  
    4444        " --setuid              - UserID to the audio user as specified via -U\n" 
    4545        " --sysclocksync        - calculate exact sample rate using the system clock\n" 
     46        " --location  LOC       - Set lion readable location of server\n" 
    4647       ); 
    4748 
     
    157158 g_config->streams[ROAR_DIR_MIDI_OUT].flags = ROAR_FLAG_SYNC; 
    158159 
     160 g_config->location = "***default***"; 
     161 
    159162 return 0; 
    160163} 
     
    379382 char addr[1024]; 
    380383 char attr[1024] = ""; 
     384 char * location; 
    381385 
    382386 if ( sockname != NULL ) 
     
    393397 
    394398 if (!unreg) { 
     399 
     400  if ( SLPEscape(g_config->location, &location, SLP_FALSE) != SLP_OK ) { 
     401   ROAR_ERR("Error using SLPEscape() on server location, really bad!"); 
     402   SLPClose(hslp); 
     403   return -1; 
     404  } 
     405 
    395406  snprintf(attr, sizeof(attr), "(wave-rate=%i),(wave-channels=%i),(wave-bits=%i)," 
    396                                "(light-channels=%i)", 
     407                               "(light-channels=%i),(location=%s)", 
    397408           g_sa->rate, g_sa->channels, g_sa->bits, 
    398            g_light_state.channels 
     409           g_light_state.channels, 
     410           location 
    399411          ); 
    400412 
     
    631643   ROAR_ERR("--setuid not supported"); 
    632644#endif 
     645  } else if ( strcmp(k, "--location") == 0 ) { 
     646   g_config->location = argv[++i]; 
    633647 
    634648  } else if ( strcmp(k, "--list-cf") == 0 ) { 
Note: See TracChangeset for help on using the changeset viewer.