@@ -123,4 +123,5 @@ Annotation_Region::handle ( int m ) | |||||
} | } | ||||
return r; | return r; | ||||
#include "const.h" | |||||
} | } |
@@ -32,6 +32,9 @@ | |||||
#include "Engine/Audio_File.H" | #include "Engine/Audio_File.H" | ||||
#include "const.h" | |||||
#include "util/debug.h" | |||||
#include <algorithm> | #include <algorithm> | ||||
using std::min; | using std::min; | ||||
using std::max; | using std::max; | ||||
@@ -282,4 +282,5 @@ Audio_Sequence::handle ( int m ) | |||||
default: | default: | ||||
return Sequence::handle( m ); | return Sequence::handle( m ); | ||||
} | } | ||||
#include "const.h" | |||||
} | } |
@@ -115,4 +115,5 @@ Control_Point::handle ( int m ) | |||||
} | } | ||||
return r; | return r; | ||||
#include "const.h" | |||||
} | } |
@@ -343,4 +343,5 @@ Control_Sequence::handle ( int m ) | |||||
default: | default: | ||||
return 0; | return 0; | ||||
} | } | ||||
#include "const.h" | |||||
} | } |
@@ -21,6 +21,7 @@ | |||||
#include "Audio_File_SF.H" | #include "Audio_File_SF.H" | ||||
#include "Audio_File_Dummy.H" | #include "Audio_File_Dummy.H" | ||||
#include "const.h" | |||||
#include "util/debug.h" | #include "util/debug.h" | ||||
#include <string.h> | #include <string.h> | ||||
@@ -27,4 +27,5 @@ Audio_File_Dummy::from_file ( const char *filename ) | |||||
Audio_File_Dummy *d = new Audio_File_Dummy; | Audio_File_Dummy *d = new Audio_File_Dummy; | ||||
d->_filename = strdup( filename ); | d->_filename = strdup( filename ); | ||||
return d; | return d; | ||||
#include "const.h" | |||||
} | } |
@@ -31,6 +31,7 @@ | |||||
// #define HAS_SF_FORMAT_VORBIS | // #define HAS_SF_FORMAT_VORBIS | ||||
#include "const.h" | |||||
#include "util/debug.h" | #include "util/debug.h" | ||||
@@ -26,6 +26,9 @@ | |||||
#include "Audio_File.H" | #include "Audio_File.H" | ||||
#include "dsp.h" | #include "dsp.h" | ||||
#include "const.h" | |||||
#include "const.h" | |||||
#include "util/debug.h" | |||||
#include "util/Thread.H" | #include "util/Thread.H" | ||||
@@ -21,6 +21,8 @@ | |||||
#include "dsp.h" | #include "dsp.h" | ||||
#include "const.h" | |||||
#include "util/debug.h" | |||||
#include "util/Thread.H" | #include "util/Thread.H" | ||||
using namespace std; | using namespace std; | ||||
@@ -67,4 +69,5 @@ Audio_Sequence::play ( sample_t *buf, nframes_t frame, nframes_t nframes, int ch | |||||
/* FIXME: bogus */ | /* FIXME: bogus */ | ||||
return nframes; | return nframes; | ||||
#include "const.h" | |||||
} | } |
@@ -21,6 +21,8 @@ | |||||
#include "../Transport.H" // for ->frame | #include "../Transport.H" // for ->frame | ||||
#include "const.h" | |||||
#include "util/debug.h" | |||||
#include "util/Thread.H" | #include "util/Thread.H" | ||||
#include <list> | #include <list> | ||||
@@ -100,4 +102,5 @@ Control_Sequence::process ( nframes_t nframes ) | |||||
} | } | ||||
else | else | ||||
return nframes; | return nframes; | ||||
#include "const.h" | |||||
} | } |
@@ -27,6 +27,10 @@ class Audio_Sequence; | |||||
#include "Disk_Stream.H" | #include "Disk_Stream.H" | ||||
#include "dsp.h" | #include "dsp.h" | ||||
#include "const.h" | |||||
#include "util/debug.h" | |||||
/**********/ | /**********/ | ||||
@@ -231,4 +235,5 @@ Disk_Stream::buffer_percent ( void ) | |||||
sem_getvalue( &_blocks, &n ); | sem_getvalue( &_blocks, &n ); | ||||
return 100 - (n * 100 / _total_blocks); | return 100 - (n * 100 / _total_blocks); | ||||
#include "const.h" | |||||
} | } |
@@ -28,6 +28,8 @@ | |||||
#include "types.h" | #include "types.h" | ||||
#include "util/Mutex.H" | #include "util/Mutex.H" | ||||
#include "const.h" | |||||
#include "util/debug.h" | |||||
#include "util/Thread.H" | #include "util/Thread.H" | ||||
class Track; | class Track; | ||||
@@ -28,6 +28,8 @@ | |||||
/* This is the home of the JACK process callback (does this *really* | /* This is the home of the JACK process callback (does this *really* | ||||
need to be a class?) */ | need to be a class?) */ | ||||
#include "const.h" | |||||
#include "util/debug.h" | |||||
#include "util/Thread.H" | #include "util/Thread.H" | ||||
@@ -309,4 +311,5 @@ Engine::request_locate ( nframes_t frame ) | |||||
{ | { | ||||
if ( timeline ) | if ( timeline ) | ||||
timeline->seek( frame ); | timeline->seek( frame ); | ||||
#include "const.h" | |||||
} | } |
@@ -39,6 +39,7 @@ | |||||
#include "Peaks.H" | #include "Peaks.H" | ||||
#include "assert.h" | #include "assert.h" | ||||
#include "const.h" | |||||
#include "util/debug.h" | #include "util/debug.h" | ||||
#include "util/Thread.H" | #include "util/Thread.H" | ||||
#include "util/file.h" | #include "util/file.h" | ||||
@@ -30,6 +30,7 @@ | |||||
#include "Engine.H" | #include "Engine.H" | ||||
#include "dsp.h" | #include "dsp.h" | ||||
#include "const.h" | |||||
#include "util/debug.h" | #include "util/debug.h" | ||||
#include "util/Thread.H" | #include "util/Thread.H" | ||||
@@ -139,4 +139,5 @@ void | |||||
Port::silence ( nframes_t nframes ) | Port::silence ( nframes_t nframes ) | ||||
{ | { | ||||
memset( buffer( nframes ), 0, nframes * sizeof( sample_t ) ); | memset( buffer( nframes ), 0, nframes * sizeof( sample_t ) ); | ||||
#include "const.h" | |||||
} | } |
@@ -29,6 +29,7 @@ | |||||
#include "Engine.H" | #include "Engine.H" | ||||
#include "dsp.h" | #include "dsp.h" | ||||
#include "const.h" | |||||
#include "util/debug.h" | #include "util/debug.h" | ||||
#include "util/Thread.H" | #include "util/Thread.H" | ||||
@@ -225,4 +225,5 @@ Timeline::total_capture_xruns ( void ) | |||||
} | } | ||||
return r; | return r; | ||||
#include "const.h" | |||||
} | } |
@@ -254,4 +254,5 @@ Track::finalize ( Capture *c, nframes_t frame ) | |||||
c->audio_file->finalize(); | c->audio_file->finalize(); | ||||
delete c->audio_file; | delete c->audio_file; | ||||
#include "const.h" | |||||
} | } |
@@ -0,0 +1,20 @@ | |||||
/*******************************************************************************/ | |||||
/* Copyright (C) 2008 Jonathan Moore Liles */ | |||||
/* */ | |||||
/* This program is free software; you can redistribute it and/or modify it */ | |||||
/* under the terms of the GNU General Public License as published by the */ | |||||
/* Free Software Foundation; either version 2 of the License, or (at your */ | |||||
/* option) any later version. */ | |||||
/* */ | |||||
/* This program is distributed in the hope that it will be useful, but WITHOUT */ | |||||
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */ | |||||
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for */ | |||||
/* more details. */ | |||||
/* */ | |||||
/* You should have received a copy of the GNU General Public License along */ | |||||
/* with This program; see the file COPYING. If not,write to the Free Software */ | |||||
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | |||||
/*******************************************************************************/ | |||||
#define __MODULE__ "non-daw:engine" |
@@ -94,4 +94,5 @@ void | |||||
buffer_fill_with_silence ( sample_t *buf, nframes_t nframes ) | buffer_fill_with_silence ( sample_t *buf, nframes_t nframes ) | ||||
{ | { | ||||
memset( buf, 0, nframes * sizeof( sample_t ) ); | memset( buf, 0, nframes * sizeof( sample_t ) ); | ||||
#include "const.h" | |||||
} | } |
@@ -31,6 +31,7 @@ | |||||
extern TLE *tle; | extern TLE *tle; | ||||
#include "const.h" | |||||
#include "util/debug.h" | #include "util/debug.h" | ||||
const float lash_poll_interval = 0.2f; | const float lash_poll_interval = 0.2f; | ||||
@@ -21,6 +21,7 @@ | |||||
#include "LASH_Client.H" | #include "LASH_Client.H" | ||||
#include "const.h" | |||||
#include "util/debug.h" | #include "util/debug.h" | ||||
@@ -19,6 +19,9 @@ | |||||
#include "Log_Entry.H" | #include "Log_Entry.H" | ||||
#include "const.h" | |||||
#include "util/debug.h" | |||||
Log_Entry::Log_Entry ( ) | Log_Entry::Log_Entry ( ) | ||||
{ | { | ||||
_sa = (char**)malloc( sizeof( char * ) ); | _sa = (char**)malloc( sizeof( char * ) ); | ||||
@@ -33,6 +33,9 @@ | |||||
#include "util/file.h" | #include "util/file.h" | ||||
#include "const.h" | |||||
#include "util/debug.h" | |||||
#include <algorithm> | #include <algorithm> | ||||
using std::min; | using std::min; | ||||
using std::max; | using std::max; | ||||
@@ -74,6 +77,33 @@ Loggable::ensure_size ( size_t n ) | |||||
} | } | ||||
} | } | ||||
void | |||||
Loggable::block_start ( void ) | |||||
{ | |||||
++Loggable::_level; | |||||
} | |||||
void | |||||
Loggable::block_end ( void ) | |||||
{ | |||||
--Loggable::_level; | |||||
ASSERT( Loggable::_level >= 0, "Programming error" ); | |||||
if ( Loggable::_level == 0 ) | |||||
flush(); | |||||
} | |||||
Loggable * | |||||
Loggable::find ( int id ) | |||||
{ | |||||
if ( id > _log_id ) | |||||
return NULL; | |||||
return _loggables[ id - 1 ]; | |||||
} | |||||
/** Open the journal /filename/ and replay it, bringing the end state back into RAM */ | /** Open the journal /filename/ and replay it, bringing the end state back into RAM */ | ||||
bool | bool | ||||
Loggable::open ( const char *filename ) | Loggable::open ( const char *filename ) | ||||
@@ -33,8 +33,6 @@ | |||||
#include "types.h" | #include "types.h" | ||||
#include "util/debug.h" | |||||
typedef void (progress_func)( int, void * ); | typedef void (progress_func)( int, void * ); | ||||
class Log_Entry; | class Log_Entry; | ||||
@@ -137,34 +135,10 @@ public: | |||||
static void compact ( void ); | static void compact ( void ); | ||||
static | |||||
void | |||||
block_start ( void ) | |||||
{ | |||||
++Loggable::_level; | |||||
} | |||||
static | |||||
void | |||||
block_end ( void ) | |||||
{ | |||||
--Loggable::_level; | |||||
ASSERT( Loggable::_level >= 0, "Programming error" ); | |||||
if ( Loggable::_level == 0 ) | |||||
flush(); | |||||
} | |||||
static | |||||
Loggable * | |||||
find ( int id ) | |||||
{ | |||||
if ( id > _log_id ) | |||||
return NULL; | |||||
static void block_start ( void ); | |||||
static void block_end ( void ); | |||||
return _loggables[ id - 1 ]; | |||||
} | |||||
static Loggable * find ( int id ); | |||||
Loggable ( bool loggable=true ) | Loggable ( bool loggable=true ) | ||||
{ | { | ||||
@@ -39,6 +39,7 @@ | |||||
#include <FL/filename.H> | #include <FL/filename.H> | ||||
#include "const.h" | |||||
#include "util/debug.h" | #include "util/debug.h" | ||||
#include "util/file.h" | #include "util/file.h" | ||||
@@ -30,6 +30,9 @@ | |||||
#include "../FL/Boxtypes.H" | #include "../FL/Boxtypes.H" | ||||
#include "const.h" | |||||
#include "util/debug.h" | |||||
using namespace std; | using namespace std; | ||||
@@ -130,4 +130,5 @@ Sequence_Point::draw ( void ) | |||||
// Sequence_Widget::draw(); | // Sequence_Widget::draw(); | ||||
draw_label( _label, align() ); | draw_label( _label, align() ); | ||||
#include "const.h" | |||||
} | } |
@@ -248,4 +248,5 @@ Sequence_Region::draw_box ( void ) | |||||
void | void | ||||
Sequence_Region::draw ( void ) | Sequence_Region::draw ( void ) | ||||
{ | { | ||||
#include "const.h" | |||||
} | } |
@@ -22,6 +22,9 @@ | |||||
#include "Sequence_Widget.H" | #include "Sequence_Widget.H" | ||||
#include "Track.H" | #include "Track.H" | ||||
#include "const.h" | |||||
#include "util/debug.h" | |||||
using namespace std; | using namespace std; | ||||
@@ -171,4 +171,5 @@ Tempo_Point::edit ( float *tempo ) | |||||
Tempo_Point_Editor ti( tempo ); | Tempo_Point_Editor ti( tempo ); | ||||
return ti.sucess(); | return ti.sucess(); | ||||
#include "const.h" | |||||
} | } |
@@ -57,4 +57,5 @@ Tempo_Sequence::handle ( int m ) | |||||
} | } | ||||
#include "const.h" | |||||
} | } |
@@ -199,4 +199,5 @@ Time_Point::edit ( time_sig *sig ) | |||||
Time_Point_Editor ti( sig ); | Time_Point_Editor ti( sig ); | ||||
return ti.sucess(); | return ti.sucess(); | ||||
#include "const.h" | |||||
} | } |
@@ -57,4 +57,5 @@ Time_Sequence::handle ( int m ) | |||||
} | } | ||||
#include "const.h" | |||||
} | } |
@@ -43,6 +43,9 @@ | |||||
#include "FL/menu_popup.H" | #include "FL/menu_popup.H" | ||||
#include "const.h" | |||||
#include "util/debug.h" | |||||
bool Timeline::draw_with_measure_lines = true; | bool Timeline::draw_with_measure_lines = true; | ||||
@@ -1401,4 +1404,5 @@ Timeline::remove_track ( Track *track ) | |||||
/* FIXME: why is this necessary? doesn't the above add do DAMAGE_CHILD? */ | /* FIXME: why is this necessary? doesn't the above add do DAMAGE_CHILD? */ | ||||
redraw(); | redraw(); | ||||
#include "const.h" | |||||
} | } |
@@ -37,6 +37,9 @@ | |||||
#include "Control_Sequence.H" | #include "Control_Sequence.H" | ||||
#include "Annotation_Sequence.H" | #include "Annotation_Sequence.H" | ||||
#include "const.h" | |||||
#include "util/debug.h" | |||||
int Track::_soloing = 0; | int Track::_soloing = 0; | ||||
@@ -776,4 +779,5 @@ Track::handle ( int m ) | |||||
} | } | ||||
return 0; | return 0; | ||||
#include "const.h" | |||||
} | } |
@@ -183,4 +183,5 @@ Transport::toggle ( void ) | |||||
stop(); | stop(); | ||||
else | else | ||||
start(); | start(); | ||||
#include "const.h" | |||||
} | } |
@@ -117,4 +117,5 @@ Waveform::draw ( int X, int Y, int W, int H, | |||||
fl_line_style( FL_SOLID, 0 ); | fl_line_style( FL_SOLID, 0 ); | ||||
} | } | ||||
#include "const.h" | |||||
} | } |
@@ -0,0 +1,20 @@ | |||||
/*******************************************************************************/ | |||||
/* Copyright (C) 2008 Jonathan Moore Liles */ | |||||
/* */ | |||||
/* This program is free software; you can redistribute it and/or modify it */ | |||||
/* under the terms of the GNU General Public License as published by the */ | |||||
/* Free Software Foundation; either version 2 of the License, or (at your */ | |||||
/* option) any later version. */ | |||||
/* */ | |||||
/* This program is distributed in the hope that it will be useful, but WITHOUT */ | |||||
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or */ | |||||
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for */ | |||||
/* more details. */ | |||||
/* */ | |||||
/* You should have received a copy of the GNU General Public License along */ | |||||
/* with This program; see the file COPYING. If not,write to the Free Software */ | |||||
/* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ | |||||
/*******************************************************************************/ | |||||
#define __MODULE__ "non-daw" |
@@ -65,6 +65,7 @@ const char COPYRIGHT[] = "Copyright (C) 2008 Jonathan Moore Liles"; | |||||
#define PACKAGE "non" | #define PACKAGE "non" | ||||
#include "const.h" | |||||
#include "util/debug.h" | #include "util/debug.h" | ||||
char *user_config_dir; | char *user_config_dir; | ||||
@@ -22,8 +22,6 @@ | |||||
/* simple wrapper for pthreads with thread role checking */ | /* simple wrapper for pthreads with thread role checking */ | ||||
#include <pthread.h> | #include <pthread.h> | ||||
#include "debug.h" | |||||
#define THREAD_ASSERT( n ) ASSERT( Thread::is( #n ), "Function called from wrong thread! (is %s, should be %s)", Thread::current()->name(), #n ) | #define THREAD_ASSERT( n ) ASSERT( Thread::is( #n ), "Function called from wrong thread! (is %s, should be %s)", Thread::current()->name(), #n ) | ||||
class Thread | class Thread | ||||