Changeset 2489:266b1a6c9683 in roaraudio


Ignore:
Timestamp:
08/24/09 00:34:37 (15 years ago)
Author:
phi
Branch:
default
Phase:
public
Message:

support to disable ssynth

Location:
roard
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • roard/include/ssynth.h

    r2471 r2489  
    2727 
    2828#include <roaraudio.h> 
     29 
     30#ifndef ROAR_WITHOUT_DCOMP_SSYNTH 
    2931 
    3032#define SSYNTH_NOTES_MAX            16 
     
    8284#endif 
    8385 
     86#endif 
     87 
    8488//ll 
  • roard/loop.c

    r2467 r2489  
    112112 
    113113  midi_reinit(); 
     114#ifndef ROAR_WITHOUT_DCOMP_SSYNTH 
    114115  ssynth_update(); 
     116#endif 
    115117  light_reinit(); 
    116118 
  • roard/midi.c

    r2487 r2489  
    8484  midi_check_bridge(g_midi_clock.stream); 
    8585 
     86#ifndef ROAR_WITHOUT_DCOMP_SSYNTH 
    8687 midi_conv_mes2ssynth(); 
     88#endif 
    8789 
    8890#ifndef ROAR_WITHOUT_DCOMP_CB 
     
    426428#undef _nb 
    427429 
     430#ifndef ROAR_WITHOUT_DCOMP_SSYNTH 
    428431int midi_conv_mes2ssynth(void) { 
    429432 struct roar_buffer        * buf = g_midi_mess.buf; 
     
    444447 return 0; 
    445448} 
     449#endif 
    446450 
    447451int midi_new_bufmes    (struct roar_buffer ** buf, struct midi_message ** mes) { 
  • roard/roard.c

    r2487 r2489  
    105105        " --midi-console-enable - Enables the console based MIDI synth\n" 
    106106        " --midi-console DEV    - Set device for MIDI console\n" 
     107#ifndef ROAR_WITHOUT_DCOMP_SSYNTH 
    107108        " --ssynth-enable       - Enable simple software synth\n" 
    108109        " --ssynth-disable      - Disable simple software synth\n" 
     110#endif 
    109111       ); 
    110112 
     
    704706 } 
    705707 
     708#ifndef ROAR_WITHOUT_DCOMP_SSYNTH 
    706709 if ( ssynth_init_config() == -1 ) { 
    707710  ROAR_ERR("Can not init ssynth config!"); 
    708711  return 1; 
    709712 } 
     713#endif 
    710714 
    711715#ifdef ROAR_SUPPORT_LISTEN 
     
    951955 
    952956  } else if ( strcmp(k, "--ssynth-enable") == 0 ) { 
     957#ifndef ROAR_WITHOUT_DCOMP_SSYNTH 
    953958   ssynth_conf.enable = 1; 
     959#else 
     960   ROAR_ERR("main(*): No support for ssynth compiled in"); 
     961#endif 
    954962  } else if ( strcmp(k, "--ssynth-disable") == 0 ) { 
     963#ifndef ROAR_WITHOUT_DCOMP_SSYNTH 
    955964   ssynth_conf.enable = 0; 
     965#else 
     966   // we can safely ignore the disable 
     967#endif 
    956968 
    957969  } else if ( strcmp(k, "-p") == 0 || strcmp(k, "--port") == 0 ) { 
     
    10891101 } 
    10901102 
     1103#ifndef ROAR_WITHOUT_DCOMP_SSYNTH 
    10911104 if ( ssynth_init() == -1 ) { 
    10921105  ROAR_ERR("Can not initialize ssynth subsystem"); 
    10931106 } 
     1107#endif 
    10941108 
    10951109 if ( light_init(light_channels) == -1 ) { 
     
    13481362 streams_free(); 
    13491363 clients_free(); 
     1364#ifndef ROAR_WITHOUT_DCOMP_SSYNTH 
    13501365 ssynth_free(); 
     1366#endif 
    13511367#ifndef ROAR_WITHOUT_DCOMP_CB 
    13521368 midi_cb_stop(); // stop console beep 
  • roard/ssynth.c

    r2476 r2489  
    2424 
    2525#include "roard.h" 
     26 
     27#ifndef ROAR_WITHOUT_DCOMP_SSYNTH 
    2628 
    2729float ssynth_polys[SSYNTH_POLY_POLYMAX][SSYNTH_POLY_COEFF] = { 
     
    303305} 
    304306 
     307#endif 
     308 
    305309//ll 
Note: See TracChangeset for help on using the changeset viewer.