diff --git a/mixer/src/Controller_Module.C b/mixer/src/Controller_Module.C index a987675..69eb3c2 100644 --- a/mixer/src/Controller_Module.C +++ b/mixer/src/Controller_Module.C @@ -868,9 +868,9 @@ Controller_Module::handle_control_changed ( Port *p ) if ( control_output[2].connected() ) { - Port *pp = control_output[2].connected_port(); +// Port *pp = control_output[2].connected_port(); float v = control_output[2].control_value(); - float s = pp->hints.maximum - pp->hints.minimum; +// float s = pp->hints.maximum - pp->hints.minimum; pan->point( 0 )->radius( v ); } diff --git a/mixer/src/Group.C b/mixer/src/Group.C index 9c199fa..7e682ea 100644 --- a/mixer/src/Group.C +++ b/mixer/src/Group.C @@ -248,7 +248,7 @@ Group::name ( const char *n ) if ( !active() ) { - const char *jack_name = Client::init( ename ); + Client::init( ename ); Module::set_sample_rate( sample_rate() ); } else diff --git a/mixer/src/Meter_Module.C b/mixer/src/Meter_Module.C index 64aebe1..e787d96 100644 --- a/mixer/src/Meter_Module.C +++ b/mixer/src/Meter_Module.C @@ -85,16 +85,13 @@ Meter_Module::configure_inputs ( int n ) { THREAD_ASSERT( UI ); - int tx, ty, tw, th; - bbox( tx,ty,tw,th ); - int on = audio_input.size(); if ( n > on ) { for ( int i = on; i < n; ++i ) { - DPM *dpm = new DPM( tx, ty, tw, th ); + DPM *dpm = new DPM( 0, 0, w(), h() ); dpm->type( FL_VERTICAL ); align( (Fl_Align)(FL_ALIGN_CENTER | FL_ALIGN_INSIDE ) ); diff --git a/mixer/src/NSM.C b/mixer/src/NSM.C index b15385a..b1083f6 100644 --- a/mixer/src/NSM.C +++ b/mixer/src/NSM.C @@ -40,7 +40,7 @@ int command_save ( char **out_msg ); int NSM_Client::command_broadcast ( const char *path, lo_message msg ) { - int argc = lo_message_get_argc( msg ); +// int argc = lo_message_get_argc( msg ); // lo_arg **argv = lo_message_get_argv( msg ); if ( !strcmp( path, "/non/hello" ) ) diff --git a/mixer/src/Panner.C b/mixer/src/Panner.C index 6d44aca..49ba6f1 100644 --- a/mixer/src/Panner.C +++ b/mixer/src/Panner.C @@ -85,6 +85,8 @@ static int find_numeric_menu_item( const Fl_Menu_Item *menu, int n ) if ( atoi( menu[i].text ) == n ) return i; } + + return -1; } void @@ -165,7 +167,7 @@ Panner::draw_the_box ( int tx, int ty, int tw, int th ) if ( ! ( _bg_image[0] && _bg_image[1] )) { - Fl_Image *i; + Fl_Image *i = NULL; switch ( tw ) { @@ -182,6 +184,8 @@ Panner::draw_the_box ( int tx, int ty, int tw, int th ) _bg_image[0] = i; + i = NULL; + switch ( tw ) { case 802: @@ -233,9 +237,9 @@ Panner::project_ortho ( const Point *p, float *X, float *Y, float *S ) const { const float x = ( 0 - p->y ) / range(); const float y = ( 0 - p->x ) / range(); - const float z = p->z; +// const float z = p->z; - float zp = 4.0f; +// float zp = 4.0f; *X = x; *Y = y; @@ -315,8 +319,6 @@ Panner::draw ( void ) draw_the_box( tx, ty, tw, th ); - const int b = 10; - // draw_box(); draw_label(); @@ -412,8 +414,6 @@ Panner::draw ( void ) if ( tw > 200 ) draw_children(); -done: - fl_line_style( FL_SOLID, 0 ); fl_pop_clip(); diff --git a/nonlib/JACK/Port.C b/nonlib/JACK/Port.C index 647f158..45ccf75 100644 --- a/nonlib/JACK/Port.C +++ b/nonlib/JACK/Port.C @@ -215,21 +215,46 @@ namespace JACK nframes_t Port::total_latency ( void ) const { +#ifdef HAVE_JACK_PORT_GET_LATENCY_RANGE + jack_latency_range_t range; + + jack_port_get_latency_range( _port, _direction == Output ? JackPlaybackLatency : JackCaptureLatency, &range ); + + return range.max; +#else return jack_port_get_total_latency( _client->jack_client() , _port ); +#endif } /** returns the number of frames of latency assigned to this port */ nframes_t Port::latency ( void ) const { +#ifdef HAVE_JACK_PORT_GET_LATENCY_RANGE + jack_latency_range_t range; + + jack_port_get_latency_range( _port, _direction == Output ? JackPlaybackLatency : JackCaptureLatency, &range ); + + return range.max; +#else return jack_port_get_latency( _port ); +#endif + } /** inform JACK that port has /frames/ frames of latency */ void Port::latency ( nframes_t frames ) { +#ifdef HAVE_JACK_PORT_GET_LATENCY_RANGE + jack_latency_range_t range; + + range.min = range.max = frames; + + jack_port_set_latency_range( _port, _direction == Output ? JackPlaybackLatency : JackCaptureLatency, &range ); +#else jack_port_set_latency( _port, frames ); +#endif } void diff --git a/sequencer/src/canvas.C b/sequencer/src/canvas.C index b294345..f764f8c 100644 --- a/sequencer/src/canvas.C +++ b/sequencer/src/canvas.C @@ -302,7 +302,7 @@ Canvas::update_mapping ( void ) adj_size(); - int old_margin = m.margin_left; +// int old_margin = m.margin_left; m.margin_left = 0; @@ -502,13 +502,9 @@ void Canvas::draw_row_name ( int y, const char *name, int color ) { bool draw = m.draw; - bool clear = false; y = ntr( y ); - if ( ! m.row_compact && ! name ) - clear = true; - y -= m.vp->y; int bx = m.origin_x; @@ -535,7 +531,7 @@ Canvas::draw_row_name ( int y, const char *name, int color ) void Canvas::draw_mapping ( void ) { - int old_margin = m.margin_left; +// int old_margin = m.margin_left; m.margin_left = 0; @@ -836,7 +832,7 @@ Canvas::draw_clip ( int X, int Y, int W, int H ) fl_end_line(); -done: +//done: fl_pop_clip(); fl_pop_clip(); @@ -1359,9 +1355,7 @@ Canvas::handle ( int m ) static int last_move_x = 0; static int last_move_y = 0; - static bool range_select; - - int ow, oh; +// static bool range_select; int x, y; int processed = 1; @@ -1374,9 +1368,6 @@ Canvas::handle ( int m ) static bool delete_note; static note_properties *drag_note; - ow = c->grid()->viewport.w; - oh = c->grid()->viewport.h; - switch ( m ) { case FL_FOCUS: @@ -1891,10 +1882,6 @@ Canvas::handle ( int m ) processed = 0; } - int nw, nh; - nw = c->grid()->viewport.w; - nh = c->grid()->viewport.h; - if ( processed ) window()->damage(FL_DAMAGE_OVERLAY); diff --git a/sequencer/src/debug.C b/sequencer/src/debug.C index d3444eb..47e46fe 100644 --- a/sequencer/src/debug.C +++ b/sequencer/src/debug.C @@ -40,7 +40,7 @@ warnf ( warning_t level, if ( file ) fprintf( fp, "%s", file ); if ( line ) - fprintf( fp, ":%i", line ); + fprintf( fp, ":%lu", line ); if ( function ) fprintf( fp, " %s()", function ); diff --git a/sequencer/src/jack.C b/sequencer/src/jack.C index 683b053..a42d241 100644 --- a/sequencer/src/jack.C +++ b/sequencer/src/jack.C @@ -271,8 +271,6 @@ stop_all_patterns ( void ) static int sync ( jack_transport_state_t state, jack_position_t *pos, void * ) { - static bool seeking = false; - switch ( state ) { case JackTransportStopped: /* new position requested */ @@ -303,7 +301,6 @@ static int process ( jack_nframes_t nframes, void *arg ) { static tick_t oph = 0; - static tick_t onph = 0; static int old_play_mode = PATTERN; static int not_dropped = 0; @@ -335,7 +332,7 @@ process ( jack_nframes_t nframes, void *arg ) ++not_dropped; - onph = nph; +// onph = nph; if ( old_play_mode != song.play_mode ) { diff --git a/timeline/src/Audio_Region.C b/timeline/src/Audio_Region.C index 7110b0a..92835ae 100644 --- a/timeline/src/Audio_Region.C +++ b/timeline/src/Audio_Region.C @@ -56,14 +56,14 @@ Fl_Color Audio_Region::_selection_color = FL_MAGENTA; -static Fl_Color fl_invert_color ( Fl_Color c ) -{ - unsigned char r, g, b; +/* static Fl_Color fl_invert_color ( Fl_Color c ) */ +/* { */ +/* unsigned char r, g, b; */ - Fl::get_color( c, r, g, b ); +/* Fl::get_color( c, r, g, b ); */ - return fl_rgb_color( 255 - r, 255 - g, 255 - b ); -} +/* return fl_rgb_color( 255 - r, 255 - g, 255 - b ); */ +/* } */ diff --git a/timeline/src/Control_Sequence.C b/timeline/src/Control_Sequence.C index 036c819..261927f 100644 --- a/timeline/src/Control_Sequence.C +++ b/timeline/src/Control_Sequence.C @@ -676,7 +676,7 @@ Control_Sequence::peer_callback( OSC::Signal *sig, OSC::Signal::State state, vo else { /* building menu */ - const char *name = sig->peer_name(); +// const char *name = sig->peer_name(); assert( sig->path() ); diff --git a/timeline/src/Engine/Audio_File_SF.C b/timeline/src/Engine/Audio_File_SF.C index a7258d9..9690e9e 100644 --- a/timeline/src/Engine/Audio_File_SF.C +++ b/timeline/src/Engine/Audio_File_SF.C @@ -91,7 +91,7 @@ Audio_File_SF::from_file ( const char *filename ) return c; -invalid: +//invalid: sf_close( in ); return NULL; diff --git a/wscript b/wscript index 6753c95..716b7bd 100644 --- a/wscript +++ b/wscript @@ -57,6 +57,11 @@ def configure(conf): conf.check_cfg(package='jack', uselib_store='JACK', args="--cflags --libs", atleast_version='0.103.0', mandatory=True) + conf.check_cc(msg='Checking for jack_port_get_latency_range()', + define_name='HAVE_JACK_PORT_GET_LATENCY_RANGE', + fragment='#include \nint main (int argc, char**argv) { jack_port_get_latency_range( (jack_port_t*)0, JackCaptureLatency, (jack_latency_range_t *)0 ); }', + mandatory=False); + conf.check_cfg(package='x11', uselib_store='XLIB',args="--cflags --libs", mandatory=True)