Get rid of a million and a half signed/unsigned expression warnings.
This commit is contained in:
parent
77621d9d77
commit
7f25ebe855
|
@ -31,6 +31,8 @@
|
|||
|
||||
// #define HAS_SF_FORMAT_VORBIS
|
||||
|
||||
#include "debug.h"
|
||||
|
||||
const Audio_File::format_desc Audio_File_SF::supported_formats[] =
|
||||
{
|
||||
{ "Wav 24", "wav", SF_FORMAT_WAV | SF_FORMAT_PCM_24 | SF_ENDIAN_FILE },
|
||||
|
@ -178,7 +180,7 @@ nframes_t
|
|||
Audio_File_SF::read ( sample_t *buf, int channel, nframes_t len )
|
||||
{
|
||||
if ( len > 256 * 100 )
|
||||
printf( "warning: attempt to read an insane number of frames (%lu) from soundfile\n", len );
|
||||
WARNING( "warning: attempt to read an insane number of frames (%lu) from soundfile\n", (unsigned long)len );
|
||||
|
||||
// printf( "len = %lu, channels = %d\n", len, _channels );
|
||||
|
||||
|
@ -193,7 +195,7 @@ Audio_File_SF::read ( sample_t *buf, int channel, nframes_t len )
|
|||
rlen = sf_readf_float( _in, tmp, len );
|
||||
|
||||
/* extract the requested channel */
|
||||
for ( int i = channel; i < rlen * _channels; i += _channels )
|
||||
for ( unsigned int i = channel; i < rlen * _channels; i += _channels )
|
||||
*(buf++) = tmp[ i ];
|
||||
|
||||
delete[] tmp;
|
||||
|
|
|
@ -55,9 +55,11 @@ Fl_Menu_Settings::indent ( FILE *fp, int n )
|
|||
int
|
||||
Fl_Menu_Settings::item_pathname_x ( char *path, int n, const Fl_Menu_Item *item )
|
||||
{
|
||||
Fl_Menu_::item_pathname( path, n, item );
|
||||
int r = Fl_Menu_::item_pathname( path, n, item );
|
||||
|
||||
remove_ampersands( path, n );
|
||||
|
||||
return r;
|
||||
}
|
||||
|
||||
/** dump options from submenu /menu/ of menubar /bar/ to file /fp/ */
|
||||
|
@ -331,4 +333,6 @@ Fl_Menu_Settings::load ( const Fl_Menu_Item *item, const char *name )
|
|||
load( this, item, fp, 0, path, sizeof( path ) );
|
||||
|
||||
fclose( fp );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -99,7 +99,7 @@ Peaks::read_peakfile_peaks ( Peak *peaks, nframes_t s, int npeaks, int chunksize
|
|||
}
|
||||
|
||||
int channels = _clip->channels();
|
||||
const int ratio = chunksize / pfchunksize;
|
||||
const unsigned int ratio = chunksize / pfchunksize;
|
||||
|
||||
/* locate to start position */
|
||||
if ( fseek( fp, (s * channels / pfchunksize) * sizeof( Peak ), SEEK_CUR ) )
|
||||
|
@ -181,7 +181,7 @@ Peaks::read_source_peaks ( Peak *peaks, int npeaks, int chunksize ) const
|
|||
p.min = 0;
|
||||
p.max = 0;
|
||||
|
||||
for ( int k = j; k < len * channels; k += channels )
|
||||
for ( nframes_t k = j; k < len * channels; k += channels )
|
||||
{
|
||||
if ( fbuf[ k ] > p.max )
|
||||
p.max = fbuf[ k ];
|
||||
|
@ -191,7 +191,7 @@ Peaks::read_source_peaks ( Peak *peaks, int npeaks, int chunksize ) const
|
|||
|
||||
}
|
||||
|
||||
if ( len < chunksize )
|
||||
if ( len < (nframes_t)chunksize )
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -218,7 +218,7 @@ Peaks::read_peaks ( nframes_t s, nframes_t e, int npeaks, int chunksize ) const
|
|||
{
|
||||
printf( "reading peaks %d @ %d\n", npeaks, chunksize );
|
||||
|
||||
if ( _peakbuf.size < npeaks * _clip->channels() )
|
||||
if ( _peakbuf.size < (nframes_t)( npeaks * _clip->channels() ) )
|
||||
{
|
||||
_peakbuf.size = npeaks * _clip->channels();
|
||||
// printf( "reallocating peak buffer %li\n", _peakbuf.size );
|
||||
|
|
|
@ -72,6 +72,8 @@ Project::close ( void )
|
|||
write_info();
|
||||
|
||||
_is_open = false;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
|
@ -92,7 +94,7 @@ Project::write_info ( void )
|
|||
fprintf( fp, "created by\n\t%s\nversion\n\t%s\nsample rate\n\t%lu\n",
|
||||
APP_TITLE " " VERSION,
|
||||
PROJECT_VERSION,
|
||||
timeline->sample_rate() );
|
||||
(unsigned long)timeline->sample_rate() );
|
||||
|
||||
fclose( fp );
|
||||
|
||||
|
|
|
@ -82,10 +82,10 @@ Sequence_Region::trim ( enum trim_e t, int X )
|
|||
|
||||
long td = timeline->x_to_ts( d );
|
||||
|
||||
if ( td < 0 && _r->offset < 0 - td )
|
||||
if ( td < 0 && _r->offset < (nframes_t)( 0 - td ) )
|
||||
td = 0 - _r->offset;
|
||||
|
||||
if ( td > 0 && td >= _r->length )
|
||||
if ( td > 0 && (nframes_t)td >= _r->length )
|
||||
td = _r->length - timeline->x_to_ts( 1 );
|
||||
|
||||
// td = _r->length - timeline->x_to_ts( 1 );
|
||||
|
@ -105,7 +105,7 @@ Sequence_Region::trim ( enum trim_e t, int X )
|
|||
|
||||
// printf( "%li %li\n", td, _r->length - _r->offset );
|
||||
|
||||
if ( td >= 0 && _r->length < td )
|
||||
if ( td >= 0 && _r->length < (nframes_t)td )
|
||||
_r->length = timeline->x_to_ts( 1 );
|
||||
else
|
||||
_r->length -= td;
|
||||
|
|
|
@ -591,13 +591,13 @@ Track::handle ( int m )
|
|||
void
|
||||
Track::update_port_names ( void )
|
||||
{
|
||||
for ( int i = 0; i < output.size(); ++i )
|
||||
for ( unsigned int i = 0; i < output.size(); ++i )
|
||||
output[ i ].name( name(), i );
|
||||
|
||||
for ( int i = 0; i < input.size(); ++i )
|
||||
for ( unsigned int i = 0; i < input.size(); ++i )
|
||||
input[ i ].name( name(), i );
|
||||
|
||||
for ( int i = 0; i < control_out.size(); ++i )
|
||||
for ( unsigned int i = 0; i < control_out.size(); ++i )
|
||||
control_out[ i ]->name( name(), i, "cv" );
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue