Browse Source

Add module information to debugging output.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
d2a8373cff
43 changed files with 138 additions and 31 deletions
  1. +1
    -0
      Timeline/Annotation_Region.C
  2. +3
    -0
      Timeline/Audio_Region.C
  3. +1
    -0
      Timeline/Audio_Sequence.C
  4. +1
    -0
      Timeline/Control_Point.C
  5. +1
    -0
      Timeline/Control_Sequence.C
  6. +1
    -0
      Timeline/Engine/Audio_File.C
  7. +1
    -0
      Timeline/Engine/Audio_File_Dummy.C
  8. +1
    -0
      Timeline/Engine/Audio_File_SF.C
  9. +3
    -0
      Timeline/Engine/Audio_Region.C
  10. +3
    -0
      Timeline/Engine/Audio_Sequence.C
  11. +3
    -0
      Timeline/Engine/Control_Sequence.C
  12. +5
    -0
      Timeline/Engine/Disk_Stream.C
  13. +2
    -0
      Timeline/Engine/Disk_Stream.H
  14. +3
    -0
      Timeline/Engine/Engine.C
  15. +1
    -0
      Timeline/Engine/Peaks.C
  16. +1
    -0
      Timeline/Engine/Playback_DS.C
  17. +1
    -0
      Timeline/Engine/Port.C
  18. +1
    -0
      Timeline/Engine/Record_DS.C
  19. +1
    -0
      Timeline/Engine/Timeline.C
  20. +1
    -0
      Timeline/Engine/Track.C
  21. +20
    -0
      Timeline/Engine/const.h
  22. +1
    -0
      Timeline/Engine/dsp.C
  23. +1
    -0
      Timeline/LASH.C
  24. +1
    -0
      Timeline/LASH_Client.C
  25. +3
    -0
      Timeline/Log_Entry.C
  26. +30
    -0
      Timeline/Loggable.C
  27. +3
    -29
      Timeline/Loggable.H
  28. +1
    -0
      Timeline/Project.C
  29. +3
    -0
      Timeline/Sequence.C
  30. +1
    -0
      Timeline/Sequence_Point.C
  31. +1
    -0
      Timeline/Sequence_Region.C
  32. +3
    -0
      Timeline/Sequence_Widget.C
  33. +1
    -0
      Timeline/Tempo_Point.C
  34. +1
    -0
      Timeline/Tempo_Sequence.C
  35. +1
    -0
      Timeline/Time_Point.C
  36. +1
    -0
      Timeline/Time_Sequence.C
  37. +4
    -0
      Timeline/Timeline.C
  38. +4
    -0
      Timeline/Track.C
  39. +1
    -0
      Timeline/Transport.C
  40. +1
    -0
      Timeline/Waveform.C
  41. +20
    -0
      Timeline/const.h
  42. +1
    -0
      Timeline/main.C
  43. +0
    -2
      util/Thread.H

+ 1
- 0
Timeline/Annotation_Region.C View File

@@ -123,4 +123,5 @@ Annotation_Region::handle ( int m )
}

return r;
#include "const.h"
}

+ 3
- 0
Timeline/Audio_Region.C View File

@@ -32,6 +32,9 @@

#include "Engine/Audio_File.H"

#include "const.h"
#include "util/debug.h"

#include <algorithm>
using std::min;
using std::max;


+ 1
- 0
Timeline/Audio_Sequence.C View File

@@ -282,4 +282,5 @@ Audio_Sequence::handle ( int m )
default:
return Sequence::handle( m );
}
#include "const.h"
}

+ 1
- 0
Timeline/Control_Point.C View File

@@ -115,4 +115,5 @@ Control_Point::handle ( int m )
}

return r;
#include "const.h"
}

+ 1
- 0
Timeline/Control_Sequence.C View File

@@ -343,4 +343,5 @@ Control_Sequence::handle ( int m )
default:
return 0;
}
#include "const.h"
}

+ 1
- 0
Timeline/Engine/Audio_File.C View File

@@ -21,6 +21,7 @@
#include "Audio_File_SF.H"
#include "Audio_File_Dummy.H"

#include "const.h"
#include "util/debug.h"

#include <string.h>


+ 1
- 0
Timeline/Engine/Audio_File_Dummy.C View File

@@ -27,4 +27,5 @@ Audio_File_Dummy::from_file ( const char *filename )
Audio_File_Dummy *d = new Audio_File_Dummy;
d->_filename = strdup( filename );
return d;
#include "const.h"
}

+ 1
- 0
Timeline/Engine/Audio_File_SF.C View File

@@ -31,6 +31,7 @@

// #define HAS_SF_FORMAT_VORBIS

#include "const.h"
#include "util/debug.h"



+ 3
- 0
Timeline/Engine/Audio_Region.C View File

@@ -26,6 +26,9 @@
#include "Audio_File.H"
#include "dsp.h"

#include "const.h"
#include "const.h"
#include "util/debug.h"
#include "util/Thread.H"



+ 3
- 0
Timeline/Engine/Audio_Sequence.C View File

@@ -21,6 +21,8 @@

#include "dsp.h"

#include "const.h"
#include "util/debug.h"
#include "util/Thread.H"

using namespace std;
@@ -67,4 +69,5 @@ Audio_Sequence::play ( sample_t *buf, nframes_t frame, nframes_t nframes, int ch

/* FIXME: bogus */
return nframes;
#include "const.h"
}

+ 3
- 0
Timeline/Engine/Control_Sequence.C View File

@@ -21,6 +21,8 @@

#include "../Transport.H" // for ->frame

#include "const.h"
#include "util/debug.h"
#include "util/Thread.H"

#include <list>
@@ -100,4 +102,5 @@ Control_Sequence::process ( nframes_t nframes )
}
else
return nframes;
#include "const.h"
}

+ 5
- 0
Timeline/Engine/Disk_Stream.C View File

@@ -27,6 +27,10 @@ class Audio_Sequence;
#include "Disk_Stream.H"
#include "dsp.h"

#include "const.h"
#include "util/debug.h"



/**********/
@@ -231,4 +235,5 @@ Disk_Stream::buffer_percent ( void )
sem_getvalue( &_blocks, &n );

return 100 - (n * 100 / _total_blocks);
#include "const.h"
}

+ 2
- 0
Timeline/Engine/Disk_Stream.H View File

@@ -28,6 +28,8 @@

#include "types.h"
#include "util/Mutex.H"
#include "const.h"
#include "util/debug.h"
#include "util/Thread.H"

class Track;


+ 3
- 0
Timeline/Engine/Engine.C View File

@@ -28,6 +28,8 @@
/* This is the home of the JACK process callback (does this *really*
need to be a class?) */

#include "const.h"
#include "util/debug.h"
#include "util/Thread.H"

@@ -309,4 +311,5 @@ Engine::request_locate ( nframes_t frame )
{
if ( timeline )
timeline->seek( frame );
#include "const.h"
}

+ 1
- 0
Timeline/Engine/Peaks.C View File

@@ -39,6 +39,7 @@
#include "Peaks.H"

#include "assert.h"
#include "const.h"
#include "util/debug.h"
#include "util/Thread.H"
#include "util/file.h"


+ 1
- 0
Timeline/Engine/Playback_DS.C View File

@@ -30,6 +30,7 @@
#include "Engine.H"
#include "dsp.h"

#include "const.h"
#include "util/debug.h"
#include "util/Thread.H"



+ 1
- 0
Timeline/Engine/Port.C View File

@@ -139,4 +139,5 @@ void
Port::silence ( nframes_t nframes )
{
memset( buffer( nframes ), 0, nframes * sizeof( sample_t ) );
#include "const.h"
}

+ 1
- 0
Timeline/Engine/Record_DS.C View File

@@ -29,6 +29,7 @@
#include "Engine.H"
#include "dsp.h"

#include "const.h"
#include "util/debug.h"
#include "util/Thread.H"



+ 1
- 0
Timeline/Engine/Timeline.C View File

@@ -225,4 +225,5 @@ Timeline::total_capture_xruns ( void )
}

return r;
#include "const.h"
}

+ 1
- 0
Timeline/Engine/Track.C View File

@@ -254,4 +254,5 @@ Track::finalize ( Capture *c, nframes_t frame )
c->audio_file->finalize();

delete c->audio_file;
#include "const.h"
}

+ 20
- 0
Timeline/Engine/const.h View File

@@ -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"

+ 1
- 0
Timeline/Engine/dsp.C View File

@@ -94,4 +94,5 @@ void
buffer_fill_with_silence ( sample_t *buf, nframes_t nframes )
{
memset( buf, 0, nframes * sizeof( sample_t ) );
#include "const.h"
}

+ 1
- 0
Timeline/LASH.C View File

@@ -31,6 +31,7 @@

extern TLE *tle;

#include "const.h"
#include "util/debug.h"

const float lash_poll_interval = 0.2f;


+ 1
- 0
Timeline/LASH_Client.C View File

@@ -21,6 +21,7 @@

#include "LASH_Client.H"

#include "const.h"
#include "util/debug.h"



+ 3
- 0
Timeline/Log_Entry.C View File

@@ -19,6 +19,9 @@

#include "Log_Entry.H"

#include "const.h"
#include "util/debug.h"

Log_Entry::Log_Entry ( )
{
_sa = (char**)malloc( sizeof( char * ) );


+ 30
- 0
Timeline/Loggable.C View File

@@ -33,6 +33,9 @@

#include "util/file.h"

#include "const.h"
#include "util/debug.h"

#include <algorithm>
using std::min;
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 */
bool
Loggable::open ( const char *filename )


+ 3
- 29
Timeline/Loggable.H View File

@@ -33,8 +33,6 @@

#include "types.h"

#include "util/debug.h"

typedef void (progress_func)( int, void * );

class Log_Entry;
@@ -137,34 +135,10 @@ public:

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 )
{


+ 1
- 0
Timeline/Project.C View File

@@ -39,6 +39,7 @@

#include <FL/filename.H>

#include "const.h"
#include "util/debug.h"
#include "util/file.h"



+ 3
- 0
Timeline/Sequence.C View File

@@ -30,6 +30,9 @@

#include "../FL/Boxtypes.H"

#include "const.h"
#include "util/debug.h"

using namespace std;



+ 1
- 0
Timeline/Sequence_Point.C View File

@@ -130,4 +130,5 @@ Sequence_Point::draw ( void )
// Sequence_Widget::draw();

draw_label( _label, align() );
#include "const.h"
}

+ 1
- 0
Timeline/Sequence_Region.C View File

@@ -248,4 +248,5 @@ Sequence_Region::draw_box ( void )
void
Sequence_Region::draw ( void )
{
#include "const.h"
}

+ 3
- 0
Timeline/Sequence_Widget.C View File

@@ -22,6 +22,9 @@
#include "Sequence_Widget.H"
#include "Track.H"

#include "const.h"
#include "util/debug.h"

using namespace std;



+ 1
- 0
Timeline/Tempo_Point.C View File

@@ -171,4 +171,5 @@ Tempo_Point::edit ( float *tempo )
Tempo_Point_Editor ti( tempo );

return ti.sucess();
#include "const.h"
}

+ 1
- 0
Timeline/Tempo_Sequence.C View File

@@ -57,4 +57,5 @@ Tempo_Sequence::handle ( int m )

}

#include "const.h"
}

+ 1
- 0
Timeline/Time_Point.C View File

@@ -199,4 +199,5 @@ Time_Point::edit ( time_sig *sig )
Time_Point_Editor ti( sig );

return ti.sucess();
#include "const.h"
}

+ 1
- 0
Timeline/Time_Sequence.C View File

@@ -57,4 +57,5 @@ Time_Sequence::handle ( int m )

}

#include "const.h"
}

+ 4
- 0
Timeline/Timeline.C View File

@@ -43,6 +43,9 @@

#include "FL/menu_popup.H"

#include "const.h"
#include "util/debug.h"


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? */
redraw();
#include "const.h"
}

+ 4
- 0
Timeline/Track.C View File

@@ -37,6 +37,9 @@
#include "Control_Sequence.H"
#include "Annotation_Sequence.H"

#include "const.h"
#include "util/debug.h"


int Track::_soloing = 0;
@@ -776,4 +779,5 @@ Track::handle ( int m )
}

return 0;
#include "const.h"
}

+ 1
- 0
Timeline/Transport.C View File

@@ -183,4 +183,5 @@ Transport::toggle ( void )
stop();
else
start();
#include "const.h"
}

+ 1
- 0
Timeline/Waveform.C View File

@@ -117,4 +117,5 @@ Waveform::draw ( int X, int Y, int W, int H,

fl_line_style( FL_SOLID, 0 );
}
#include "const.h"
}

+ 20
- 0
Timeline/const.h View File

@@ -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"

+ 1
- 0
Timeline/main.C View File

@@ -65,6 +65,7 @@ const char COPYRIGHT[] = "Copyright (C) 2008 Jonathan Moore Liles";
#define PACKAGE "non"


#include "const.h"
#include "util/debug.h"

char *user_config_dir;


+ 0
- 2
util/Thread.H View File

@@ -22,8 +22,6 @@
/* simple wrapper for pthreads with thread role checking */
#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 )

class Thread


Loading…
Cancel
Save