Browse Source

Mixer: Add commandline option for specifying the OSC port to use.

tags/non-daw-v1.1.0
Jonathan Moore Liles 13 years ago
parent
commit
d959b54f6a
3 changed files with 27 additions and 1 deletions
  1. +5
    -1
      mixer/src/Mixer.C
  2. +2
    -0
      mixer/src/Mixer.H
  3. +20
    -0
      mixer/src/main.C

+ 5
- 1
mixer/src/Mixer.C View File

@@ -384,8 +384,12 @@ Mixer::Mixer ( int X, int Y, int W, int H, const char *L ) :
update_menu();

load_options();
}

osc_endpoint = new OSC::Endpoint();
void
Mixer::init_osc ( const char *osc_port )
{
osc_endpoint = new OSC::Endpoint(osc_port);

osc_endpoint->url();



+ 2
- 0
mixer/src/Mixer.H View File

@@ -95,6 +95,8 @@ public:

void announce ( const char *nash_url );

void init_osc ( const char* osc_port );

public:

bool command_save ( void );


+ 20
- 0
mixer/src/main.C View File

@@ -137,8 +137,11 @@ main ( int argc, char **argv )

o->callback( (Fl_Callback*)cb_main, main_window );
o->show( argc, argv );
// o->show();
}

const char *osc_port = NULL;

{
int r = argc - 1;
int i = 1;
@@ -150,6 +153,7 @@ main ( int argc, char **argv )
{
MESSAGE( "Using instance name \"%s\"", argv[i+1] );
instance_name = argv[i+1];
--r;
++i;
}
else
@@ -157,6 +161,20 @@ main ( int argc, char **argv )
FATAL( "Missing instance name" );
}
}
else if ( !strcmp( argv[i], "--osc-port" ) )
{
if ( r > 1 )
{
MESSAGE( "Using OSC port \"%s\"", argv[i+1] );
osc_port = argv[i+1];
--r;
++i;
}
else
{
FATAL( "Missing OSC port" );
}
}
else if ( !strncmp( argv[i], "--", 2 ) )
{
WARNING( "Unrecognized option: %s", argv[i] );
@@ -177,6 +195,8 @@ main ( int argc, char **argv )

}

mixer->init_osc( osc_port );

Fl::run();

delete main_window;


Loading…
Cancel
Save