@@ -868,9 +868,9 @@ Controller_Module::handle_control_changed ( Port *p ) | |||||
if ( control_output[2].connected() ) | 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 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 ); | pan->point( 0 )->radius( v ); | ||||
} | } | ||||
@@ -248,7 +248,7 @@ Group::name ( const char *n ) | |||||
if ( !active() ) | if ( !active() ) | ||||
{ | { | ||||
const char *jack_name = Client::init( ename ); | |||||
Client::init( ename ); | |||||
Module::set_sample_rate( sample_rate() ); | Module::set_sample_rate( sample_rate() ); | ||||
} | } | ||||
else | else | ||||
@@ -85,16 +85,13 @@ Meter_Module::configure_inputs ( int n ) | |||||
{ | { | ||||
THREAD_ASSERT( UI ); | THREAD_ASSERT( UI ); | ||||
int tx, ty, tw, th; | |||||
bbox( tx,ty,tw,th ); | |||||
int on = audio_input.size(); | int on = audio_input.size(); | ||||
if ( n > on ) | if ( n > on ) | ||||
{ | { | ||||
for ( int i = on; i < n; ++i ) | 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 ); | dpm->type( FL_VERTICAL ); | ||||
align( (Fl_Align)(FL_ALIGN_CENTER | FL_ALIGN_INSIDE ) ); | align( (Fl_Align)(FL_ALIGN_CENTER | FL_ALIGN_INSIDE ) ); | ||||
@@ -40,7 +40,7 @@ int command_save ( char **out_msg ); | |||||
int | int | ||||
NSM_Client::command_broadcast ( const char *path, lo_message msg ) | 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 ); | // lo_arg **argv = lo_message_get_argv( msg ); | ||||
if ( !strcmp( path, "/non/hello" ) ) | if ( !strcmp( path, "/non/hello" ) ) | ||||
@@ -85,6 +85,8 @@ static int find_numeric_menu_item( const Fl_Menu_Item *menu, int n ) | |||||
if ( atoi( menu[i].text ) == n ) | if ( atoi( menu[i].text ) == n ) | ||||
return i; | return i; | ||||
} | } | ||||
return -1; | |||||
} | } | ||||
void | void | ||||
@@ -165,7 +167,7 @@ Panner::draw_the_box ( int tx, int ty, int tw, int th ) | |||||
if ( ! ( _bg_image[0] && _bg_image[1] )) | if ( ! ( _bg_image[0] && _bg_image[1] )) | ||||
{ | { | ||||
Fl_Image *i; | |||||
Fl_Image *i = NULL; | |||||
switch ( tw ) | switch ( tw ) | ||||
{ | { | ||||
@@ -182,6 +184,8 @@ Panner::draw_the_box ( int tx, int ty, int tw, int th ) | |||||
_bg_image[0] = i; | _bg_image[0] = i; | ||||
i = NULL; | |||||
switch ( tw ) | switch ( tw ) | ||||
{ | { | ||||
case 802: | 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 x = ( 0 - p->y ) / range(); | ||||
const float y = ( 0 - p->x ) / 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; | *X = x; | ||||
*Y = y; | *Y = y; | ||||
@@ -315,8 +319,6 @@ Panner::draw ( void ) | |||||
draw_the_box( tx, ty, tw, th ); | draw_the_box( tx, ty, tw, th ); | ||||
const int b = 10; | |||||
// draw_box(); | // draw_box(); | ||||
draw_label(); | draw_label(); | ||||
@@ -412,8 +414,6 @@ Panner::draw ( void ) | |||||
if ( tw > 200 ) | if ( tw > 200 ) | ||||
draw_children(); | draw_children(); | ||||
done: | |||||
fl_line_style( FL_SOLID, 0 ); | fl_line_style( FL_SOLID, 0 ); | ||||
fl_pop_clip(); | fl_pop_clip(); | ||||
@@ -215,21 +215,46 @@ namespace JACK | |||||
nframes_t | nframes_t | ||||
Port::total_latency ( void ) const | 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 ); | return jack_port_get_total_latency( _client->jack_client() , _port ); | ||||
#endif | |||||
} | } | ||||
/** returns the number of frames of latency assigned to this port */ | /** returns the number of frames of latency assigned to this port */ | ||||
nframes_t | nframes_t | ||||
Port::latency ( void ) const | 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 ); | return jack_port_get_latency( _port ); | ||||
#endif | |||||
} | } | ||||
/** inform JACK that port has /frames/ frames of latency */ | /** inform JACK that port has /frames/ frames of latency */ | ||||
void | void | ||||
Port::latency ( nframes_t frames ) | 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 ); | jack_port_set_latency( _port, frames ); | ||||
#endif | |||||
} | } | ||||
void | void | ||||
@@ -302,7 +302,7 @@ Canvas::update_mapping ( void ) | |||||
adj_size(); | adj_size(); | ||||
int old_margin = m.margin_left; | |||||
// int old_margin = m.margin_left; | |||||
m.margin_left = 0; | m.margin_left = 0; | ||||
@@ -502,13 +502,9 @@ void | |||||
Canvas::draw_row_name ( int y, const char *name, int color ) | Canvas::draw_row_name ( int y, const char *name, int color ) | ||||
{ | { | ||||
bool draw = m.draw; | bool draw = m.draw; | ||||
bool clear = false; | |||||
y = ntr( y ); | y = ntr( y ); | ||||
if ( ! m.row_compact && ! name ) | |||||
clear = true; | |||||
y -= m.vp->y; | y -= m.vp->y; | ||||
int bx = m.origin_x; | int bx = m.origin_x; | ||||
@@ -535,7 +531,7 @@ Canvas::draw_row_name ( int y, const char *name, int color ) | |||||
void | void | ||||
Canvas::draw_mapping ( void ) | Canvas::draw_mapping ( void ) | ||||
{ | { | ||||
int old_margin = m.margin_left; | |||||
// int old_margin = m.margin_left; | |||||
m.margin_left = 0; | m.margin_left = 0; | ||||
@@ -836,7 +832,7 @@ Canvas::draw_clip ( int X, int Y, int W, int H ) | |||||
fl_end_line(); | fl_end_line(); | ||||
done: | |||||
//done: | |||||
fl_pop_clip(); | fl_pop_clip(); | ||||
fl_pop_clip(); | fl_pop_clip(); | ||||
@@ -1359,9 +1355,7 @@ Canvas::handle ( int m ) | |||||
static int last_move_x = 0; | static int last_move_x = 0; | ||||
static int last_move_y = 0; | static int last_move_y = 0; | ||||
static bool range_select; | |||||
int ow, oh; | |||||
// static bool range_select; | |||||
int x, y; | int x, y; | ||||
int processed = 1; | int processed = 1; | ||||
@@ -1374,9 +1368,6 @@ Canvas::handle ( int m ) | |||||
static bool delete_note; | static bool delete_note; | ||||
static note_properties *drag_note; | static note_properties *drag_note; | ||||
ow = c->grid()->viewport.w; | |||||
oh = c->grid()->viewport.h; | |||||
switch ( m ) | switch ( m ) | ||||
{ | { | ||||
case FL_FOCUS: | case FL_FOCUS: | ||||
@@ -1891,10 +1882,6 @@ Canvas::handle ( int m ) | |||||
processed = 0; | processed = 0; | ||||
} | } | ||||
int nw, nh; | |||||
nw = c->grid()->viewport.w; | |||||
nh = c->grid()->viewport.h; | |||||
if ( processed ) | if ( processed ) | ||||
window()->damage(FL_DAMAGE_OVERLAY); | window()->damage(FL_DAMAGE_OVERLAY); | ||||
@@ -40,7 +40,7 @@ warnf ( warning_t level, | |||||
if ( file ) | if ( file ) | ||||
fprintf( fp, "%s", file ); | fprintf( fp, "%s", file ); | ||||
if ( line ) | if ( line ) | ||||
fprintf( fp, ":%i", line ); | |||||
fprintf( fp, ":%lu", line ); | |||||
if ( function ) | if ( function ) | ||||
fprintf( fp, " %s()", function ); | fprintf( fp, " %s()", function ); | ||||
@@ -271,8 +271,6 @@ stop_all_patterns ( void ) | |||||
static int | static int | ||||
sync ( jack_transport_state_t state, jack_position_t *pos, void * ) | sync ( jack_transport_state_t state, jack_position_t *pos, void * ) | ||||
{ | { | ||||
static bool seeking = false; | |||||
switch ( state ) | switch ( state ) | ||||
{ | { | ||||
case JackTransportStopped: /* new position requested */ | case JackTransportStopped: /* new position requested */ | ||||
@@ -303,7 +301,6 @@ static int | |||||
process ( jack_nframes_t nframes, void *arg ) | process ( jack_nframes_t nframes, void *arg ) | ||||
{ | { | ||||
static tick_t oph = 0; | static tick_t oph = 0; | ||||
static tick_t onph = 0; | |||||
static int old_play_mode = PATTERN; | static int old_play_mode = PATTERN; | ||||
static int not_dropped = 0; | static int not_dropped = 0; | ||||
@@ -335,7 +332,7 @@ process ( jack_nframes_t nframes, void *arg ) | |||||
++not_dropped; | ++not_dropped; | ||||
onph = nph; | |||||
// onph = nph; | |||||
if ( old_play_mode != song.play_mode ) | if ( old_play_mode != song.play_mode ) | ||||
{ | { | ||||
@@ -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 ); */ | |||||
/* } */ | |||||
@@ -676,7 +676,7 @@ Control_Sequence::peer_callback( OSC::Signal *sig, OSC::Signal::State state, vo | |||||
else | else | ||||
{ | { | ||||
/* building menu */ | /* building menu */ | ||||
const char *name = sig->peer_name(); | |||||
// const char *name = sig->peer_name(); | |||||
assert( sig->path() ); | assert( sig->path() ); | ||||
@@ -91,7 +91,7 @@ Audio_File_SF::from_file ( const char *filename ) | |||||
return c; | return c; | ||||
invalid: | |||||
//invalid: | |||||
sf_close( in ); | sf_close( in ); | ||||
return NULL; | return NULL; | ||||
@@ -57,6 +57,11 @@ def configure(conf): | |||||
conf.check_cfg(package='jack', uselib_store='JACK', args="--cflags --libs", | conf.check_cfg(package='jack', uselib_store='JACK', args="--cflags --libs", | ||||
atleast_version='0.103.0', mandatory=True) | 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 <jack/jack.h>\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", | conf.check_cfg(package='x11', uselib_store='XLIB',args="--cflags --libs", | ||||
mandatory=True) | mandatory=True) | ||||