Changeset 2494:353c82155185 in roaraudio


Ignore:
Timestamp:
08/24/09 02:20:24 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

support to disable light subsystem and some parts of MIDI and raw

File:
1 edited

Legend:

Unmodified
Added
Removed
  • roard/roard.c

    r2490 r2494  
    111111       ); 
    112112 
     113#ifndef ROAR_WITHOUT_DCOMP_LIGHT 
    113114 printf("\nLight Control Options:\n\n"); 
    114115 printf(" --light-channels NUM  - Sets the number of channels for Light control (default: %i)\n", 
    115116                                  LIGHT_CHANNELS_DEFAULT 
    116117       ); 
     118#endif 
    117119 
    118120 printf("\nServer Options:\n\n"); 
     
    372374   if ( !strcasecmp(v, "wave") || !strcasecmp(v, "waveform") ) { 
    373375    dir = ROAR_DIR_OUTPUT; 
     376#ifndef ROAR_WITHOUT_DCOMP_MIDI 
    374377   } else if ( !strcasecmp(v, "midi") ) { 
    375378    dir = ROAR_DIR_MIDI_OUT; 
     379#endif 
     380#ifndef ROAR_WITHOUT_DCOMP_LIGHT 
    376381   } else if ( !strcasecmp(v, "light") ) { 
    377382    dir = ROAR_DIR_LIGHT_OUT; 
     383#endif 
     384#ifndef ROAR_WITHOUT_DCOMP_RAW 
    378385   } else if ( !strcasecmp(v, "raw") ) { 
    379386    dir = ROAR_DIR_RAW_OUT; 
     387#endif 
    380388   } else { 
    381     ROAR_ERR("add_output(*): unknown subsystem '%s'", k); 
     389    ROAR_ERR("add_output(*): unknown/unsupported subsystem '%s'", k); 
    382390    error++; 
    383391   } 
     
    548556 
    549557  snprintf(attr, sizeof(attr), "(wave-rate=%i),(wave-channels=%i),(wave-bits=%i)," 
    550                                "(light-channels=%i),(location=%s)", 
     558#ifndef ROAR_WITHOUT_DCOMP_LIGHT 
     559                               "(light-channels=%i)," 
     560#endif 
     561                               "(location=%s)", 
    551562           g_sa->rate, g_sa->channels, g_sa->bits, 
     563#ifndef ROAR_WITHOUT_DCOMP_LIGHT 
    552564           g_light_state.channels, 
     565#endif 
    553566           location 
    554567          ); 
     
    638651 int    o_prim    = 0; 
    639652 int    o_count   = 0; 
     653#ifndef ROAR_WITHOUT_DCOMP_LIGHT 
    640654 int    light_channels = LIGHT_CHANNELS_DEFAULT; 
     655#endif 
    641656 char * sock_grp  = ROAR_DEFAULT_SOCKGRP; 
    642657 char * sock_user = NULL; 
     
    932947 
    933948  } else if ( strcmp(k, "--light-channels") == 0 ) { 
     949#ifndef ROAR_WITHOUT_DCOMP_LIGHT 
    934950   light_channels = atoi(argv[++i]); 
     951#else 
     952   ROAR_WARN("main(*): no light subsystem compiled in"); 
     953#endif 
    935954 
    936955  } else if ( strcmp(k, "--midi-no-console") == 0 ) { 
     
    11071126#endif 
    11081127 
     1128#ifndef ROAR_WITHOUT_DCOMP_LIGHT 
    11091129 if ( light_init(light_channels) == -1 ) { 
    11101130  ROAR_ERR("Can not initialize light control subsystem"); 
    11111131 } 
     1132#endif 
    11121133 
    11131134#ifdef ROAR_SUPPORT_LISTEN 
     
    13691390#endif 
    13701391 midi_free(); 
     1392#ifndef ROAR_WITHOUT_DCOMP_LIGHT 
    13711393 light_free(); 
     1394#endif 
    13721395 
    13731396#ifdef SUPPORT_PIDFILE 
Note: See TracChangeset for help on using the changeset viewer.