Clean up some new warnings from the new version of GCC.
This commit is contained in:
parent
0e34509e51
commit
bb7e7b46f6
|
@ -579,7 +579,7 @@ Audio_Region::draw ( void )
|
|||
int ox = timeline->ts_to_x( _r->start );
|
||||
|
||||
if ( ox > OX + sequence()->w() ||
|
||||
ox < OX && ox + abs_w() < OX )
|
||||
( ox < OX && ox + abs_w() < OX ) )
|
||||
/* not in viewport */
|
||||
return;
|
||||
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
|
||||
#include "util/debug.h"
|
||||
|
||||
#include <string.h>
|
||||
|
||||
std::map <std::string, Audio_File*> Audio_File::_open_files;
|
||||
|
||||
Audio_File::~Audio_File ( )
|
||||
|
@ -32,6 +34,16 @@ Audio_File::~Audio_File ( )
|
|||
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
|
||||
Audio_File::all_supported_formats ( std::list <const char *> &formats )
|
||||
{
|
||||
|
|
|
@ -56,16 +56,7 @@ protected:
|
|||
|
||||
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:
|
||||
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -29,14 +29,7 @@ class Audio_File_Dummy : public Audio_File
|
|||
|
||||
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; }
|
||||
|
||||
|
|
|
@ -80,7 +80,8 @@ protected:
|
|||
void block_processed ( void ) { sem_post( &_blocks ); }
|
||||
bool wait_for_block ( void )
|
||||
{
|
||||
while ( ! sem_wait( &_blocks ) && errno == EINTR );
|
||||
while ( ! sem_wait( &_blocks ) && errno == EINTR )
|
||||
{}
|
||||
|
||||
return ! _terminate;
|
||||
}
|
||||
|
|
|
@ -372,12 +372,14 @@ Peaks::read_peakfile_peaks ( Peak *peaks, nframes_t s, int npeaks, nframes_t chu
|
|||
if ( ! transport->recording )
|
||||
{
|
||||
if ( ! current() )
|
||||
{
|
||||
/* Build peaks asyncronously */
|
||||
if ( ! fork() )
|
||||
exit( make_peaks() );
|
||||
else
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
Peakfile _peakfile;
|
||||
|
||||
|
|
|
@ -24,7 +24,6 @@
|
|||
#include "Audio_File_SF.H"
|
||||
class Audio_File;
|
||||
class Peak_Writer;
|
||||
class Track::Capture;
|
||||
|
||||
class Record_DS : public Disk_Stream
|
||||
{
|
||||
|
|
|
@ -466,6 +466,8 @@ Loggable::compact ( void )
|
|||
fseek( _fp, 0, SEEK_END );
|
||||
}
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
/** Buffered sprintf wrapper */
|
||||
void
|
||||
Loggable::log ( const char *fmt, ... )
|
||||
|
|
|
@ -143,11 +143,13 @@ Transport::cb_button ( Fl_Widget *w )
|
|||
redraw();
|
||||
|
||||
if ( rolling )
|
||||
{
|
||||
if ( _record_button->value() )
|
||||
timeline->record();
|
||||
else
|
||||
timeline->stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
|
|
Loading…
Reference in New Issue