Browse Source

Clean up some new warnings from the new version of GCC.

tags/non-daw-v1.1.0
Jonathan Moore Liles 17 years ago
parent
commit
bb7e7b46f6
10 changed files with 53 additions and 21 deletions
  1. +1
    -1
      Timeline/Audio_Region.C
  2. +12
    -0
      Timeline/Engine/Audio_File.C
  3. +1
    -10
      Timeline/Engine/Audio_File.H
  4. +30
    -0
      Timeline/Engine/Audio_File_Dummy.C
  5. +1
    -8
      Timeline/Engine/Audio_File_Dummy.H
  6. +2
    -1
      Timeline/Engine/Disk_Stream.H
  7. +2
    -0
      Timeline/Engine/Peaks.C
  8. +0
    -1
      Timeline/Engine/Record_DS.H
  9. +2
    -0
      Timeline/Loggable.C
  10. +2
    -0
      Timeline/Transport.C

+ 1
- 1
Timeline/Audio_Region.C View File

@@ -579,7 +579,7 @@ Audio_Region::draw ( void )
int ox = timeline->ts_to_x( _r->start ); int ox = timeline->ts_to_x( _r->start );


if ( ox > OX + sequence()->w() || if ( ox > OX + sequence()->w() ||
ox < OX && ox + abs_w() < OX )
( ox < OX && ox + abs_w() < OX ) )
/* not in viewport */ /* not in viewport */
return; return;




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

@@ -23,6 +23,8 @@


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


#include <string.h>

std::map <std::string, Audio_File*> Audio_File::_open_files; std::map <std::string, Audio_File*> Audio_File::_open_files;


Audio_File::~Audio_File ( ) Audio_File::~Audio_File ( )
@@ -32,6 +34,16 @@ Audio_File::~Audio_File ( )
free( _filename ); free( _filename );
} }


const Audio_File::format_desc *
Audio_File::find_format ( const format_desc *fd, const char *name )
{
for ( ; fd->name; ++fd )
if ( ! strcmp( fd->name, name ) )
return fd;

return NULL;
}

void void
Audio_File::all_supported_formats ( std::list <const char *> &formats ) Audio_File::all_supported_formats ( std::list <const char *> &formats )
{ {


+ 1
- 10
Timeline/Engine/Audio_File.H View File

@@ -56,16 +56,7 @@ protected:


Peaks _peaks; Peaks _peaks;


static const format_desc *
find_format ( const format_desc *fd, const char *name )
{
for ( ; fd->name; ++fd )
if ( ! strcmp( fd->name, name ) )
return fd;

return NULL;
}

static const format_desc * find_format ( const format_desc *fd, const char *name );


public: public:




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

@@ -0,0 +1,30 @@

/*******************************************************************************/
/* 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. */
/*******************************************************************************/

#include "Audio_File_Dummy.H"

#include <string.h>

Audio_File_Dummy *
Audio_File_Dummy::from_file ( const char *filename )
{
Audio_File_Dummy *d = new Audio_File_Dummy;
d->_filename = strdup( filename );
return d;
}

+ 1
- 8
Timeline/Engine/Audio_File_Dummy.H View File

@@ -29,14 +29,7 @@ class Audio_File_Dummy : public Audio_File


public: public:


/* static const Audio_File::format_desc supported_formats[]; */

static Audio_File_Dummy *from_file ( const char *filename )
{
Audio_File_Dummy *d = new Audio_File_Dummy;
d->_filename = strdup( filename );
return d;
}
static Audio_File_Dummy *from_file ( const char *filename );


bool dummy ( void ) const { return true; } bool dummy ( void ) const { return true; }




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

@@ -80,7 +80,8 @@ protected:
void block_processed ( void ) { sem_post( &_blocks ); } void block_processed ( void ) { sem_post( &_blocks ); }
bool wait_for_block ( void ) bool wait_for_block ( void )
{ {
while ( ! sem_wait( &_blocks ) && errno == EINTR );
while ( ! sem_wait( &_blocks ) && errno == EINTR )
{}


return ! _terminate; return ! _terminate;
} }


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

@@ -372,11 +372,13 @@ Peaks::read_peakfile_peaks ( Peak *peaks, nframes_t s, int npeaks, nframes_t chu
if ( ! transport->recording ) if ( ! transport->recording )
{ {
if ( ! current() ) if ( ! current() )
{
/* Build peaks asyncronously */ /* Build peaks asyncronously */
if ( ! fork() ) if ( ! fork() )
exit( make_peaks() ); exit( make_peaks() );
else else
return 0; return 0;
}
} }


Peakfile _peakfile; Peakfile _peakfile;


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

@@ -24,7 +24,6 @@
#include "Audio_File_SF.H" #include "Audio_File_SF.H"
class Audio_File; class Audio_File;
class Peak_Writer; class Peak_Writer;
class Track::Capture;


class Record_DS : public Disk_Stream class Record_DS : public Disk_Stream
{ {


+ 2
- 0
Timeline/Loggable.C View File

@@ -466,6 +466,8 @@ Loggable::compact ( void )
fseek( _fp, 0, SEEK_END ); fseek( _fp, 0, SEEK_END );
} }


#include <stdarg.h>

/** Buffered sprintf wrapper */ /** Buffered sprintf wrapper */
void void
Loggable::log ( const char *fmt, ... ) Loggable::log ( const char *fmt, ... )


+ 2
- 0
Timeline/Transport.C View File

@@ -143,10 +143,12 @@ Transport::cb_button ( Fl_Widget *w )
redraw(); redraw();


if ( rolling ) if ( rolling )
{
if ( _record_button->value() ) if ( _record_button->value() )
timeline->record(); timeline->record();
else else
timeline->stop(); timeline->stop();
}
} }
} }




Loading…
Cancel
Save