fixed compiler warnings
git-svn-id: https://lmms.svn.sf.net/svnroot/lmms/trunk/lmms@1680 0778d3d1-df1d-0410-868b-ea421aaaa00d
This commit is contained in:
@@ -70,12 +70,12 @@ plugin::descriptor PLUGIN_EXPORT bitinvader_plugin_descriptor =
|
||||
|
||||
bSynth::bSynth( float * _shape, int _length, notePlayHandle * _nph, bool _interpolation,
|
||||
float _factor, const sample_rate_t _sample_rate ) :
|
||||
sample_length( _length ),
|
||||
nph( _nph ),
|
||||
interpolation( _interpolation),
|
||||
sample_rate( _sample_rate ),
|
||||
sample_index( 0 ),
|
||||
sample_realindex( 0 )
|
||||
sample_realindex( 0 ),
|
||||
nph( _nph ),
|
||||
sample_length( _length ),
|
||||
sample_rate( _sample_rate ),
|
||||
interpolation( _interpolation)
|
||||
{
|
||||
sample_shape = new float[sample_length];
|
||||
for (int i=0; i < _length; i++)
|
||||
|
||||
@@ -525,7 +525,7 @@ int lb302Synth::process(sampleFrame *outbuf, const Uint32 size)
|
||||
sample_cnt++;
|
||||
vcf_envpos++;
|
||||
|
||||
int decay_frames = 128;
|
||||
//int decay_frames = 128;
|
||||
|
||||
// update vco
|
||||
vco_c += vco_inc;
|
||||
@@ -718,7 +718,7 @@ void lb302Synth::initNote( lb302Note *n)
|
||||
void lb302Synth::playNote( notePlayHandle * _n, bool,
|
||||
sampleFrame * _working_buffer )
|
||||
{
|
||||
fpp_t framesPerPeriod = engine::getMixer()->framesPerPeriod();
|
||||
//fpp_t framesPerPeriod = engine::getMixer()->framesPerPeriod();
|
||||
|
||||
if( _n->isArpeggioBaseNote() )
|
||||
{
|
||||
|
||||
@@ -339,8 +339,9 @@ bool midiImport::readSMF( trackContainer * _tc )
|
||||
if( evt->chan == -1 )
|
||||
{
|
||||
printf("MISSING GLOBAL THINGY\n");
|
||||
printf(" %d %d %f %s\n", evt->chan,
|
||||
evt->get_type_code(), evt->time, evt->get_attribute() );
|
||||
printf(" %d %d %f %s\n", (int) evt->chan,
|
||||
evt->get_type_code(), evt->time,
|
||||
evt->get_attribute() );
|
||||
// Global stuff
|
||||
}
|
||||
else if( evt->is_note() && evt->chan < 256 )
|
||||
@@ -445,7 +446,7 @@ bool midiImport::readSMF( trackContainer * _tc )
|
||||
}
|
||||
}
|
||||
else {
|
||||
printf("Unhandled update: %d %d %f %s\n", evt->chan,
|
||||
printf("Unhandled update: %d %d %f %s\n", (int) evt->chan,
|
||||
evt->get_type_code(), evt->time, evt->get_attribute() );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@ using namespace std;
|
||||
// 4311 is type cast ponter to long warning
|
||||
// 4996 is warning against strcpy
|
||||
// 4267 is size_t to long warning
|
||||
#pragma warning(disable: 4311 4996 4267)
|
||||
//#pragma warning(disable: 4311 4996 4267)
|
||||
Alg_atoms symbol_table;
|
||||
Serial_buffer Alg_track::ser_buf; // declare the static variable
|
||||
|
||||
@@ -121,7 +121,7 @@ void Alg_parameter::show()
|
||||
printf("%s:%s", attr_name(), s);
|
||||
break;
|
||||
case 'i':
|
||||
printf("%s:%d", attr_name(), i);
|
||||
printf("%s:%d", attr_name(), (int) i);
|
||||
break;
|
||||
case 'l':
|
||||
printf("%s:%s", attr_name(), (l ? "t" : "f"));
|
||||
@@ -601,7 +601,7 @@ void Alg_note::show()
|
||||
{
|
||||
printf("Alg_note: time %g, chan %d, dur %g, key %d, "
|
||||
"pitch %g, loud %g, attributes ",
|
||||
time, chan, dur, key, pitch, loud);
|
||||
time, (int) chan, dur, (int) key, pitch, loud);
|
||||
Alg_parameters_ptr parms = parameters;
|
||||
while (parms) {
|
||||
parms->parm.show();
|
||||
@@ -668,8 +668,9 @@ Alg_event_ptr Alg_events::uninsert(long index)
|
||||
{
|
||||
assert(0 <= index && index < len);
|
||||
Alg_event_ptr event = events[index];
|
||||
printf("memmove: %x from %x (%d)\n", events + index, events + index + 1,
|
||||
sizeof(Alg_event_ptr) * (len - index - 1));
|
||||
printf("memmove: %x from %x (%d)\n", (int) ( events + index ),
|
||||
(int) ( events + index + 1 ),
|
||||
(int)( sizeof(Alg_event_ptr) * (len - index - 1) ) );
|
||||
memmove(events + index, events + index + 1,
|
||||
sizeof(Alg_event_ptr) * (len - index - 1));
|
||||
len--;
|
||||
@@ -1741,7 +1742,7 @@ void Alg_track::paste(double t, Alg_event_list *seq)
|
||||
assert(get_type() == 't');
|
||||
// seq can be an Alg_event_list, an Alg_track, or an Alg_seq
|
||||
// if it is an Alg_event_list, units_are_seconds must match
|
||||
bool prev_units_are_seconds;
|
||||
bool prev_units_are_seconds = false;
|
||||
if (seq->get_type() == 'e') {
|
||||
assert(seq->get_owner()->get_units_are_seconds() == units_are_seconds);
|
||||
} else { // make it match
|
||||
@@ -2193,8 +2194,8 @@ void Alg_tracks::reset()
|
||||
// all track events are incorporated into the seq,
|
||||
// so all we need to delete are the arrays of pointers
|
||||
for (int i = 0; i < len; i++) {
|
||||
printf("deleting track at %d (%x, this %x) = %x\n", i, &(tracks[i]),
|
||||
this, tracks[i]);
|
||||
printf("deleting track at %d (%x, this %x) = %x\n", i, (int) &(tracks[i]),
|
||||
(int) this, (int) tracks[i]);
|
||||
delete tracks[i];
|
||||
}
|
||||
if (tracks) delete [] tracks;
|
||||
@@ -2817,7 +2818,7 @@ Alg_event_ptr Alg_seq::iteration_next()
|
||||
long cur; // a track index
|
||||
// find lowest next time of any track:
|
||||
double next = 1000000.0;
|
||||
int i, track;
|
||||
int i, track = 0;
|
||||
for (i = 0; i < track_list.length(); i++) {
|
||||
Alg_track &tr = track_list[i];
|
||||
cur = current[i];
|
||||
@@ -2853,7 +2854,7 @@ void Alg_seq::merge_tracks()
|
||||
long notes_index = 0;
|
||||
|
||||
Alg_event_ptr event;
|
||||
while (event = iteration_next()) {
|
||||
while (( event = iteration_next() )) {
|
||||
notes[notes_index++] = event;
|
||||
}
|
||||
track_list.reset(); // don't need them any more
|
||||
|
||||
@@ -353,7 +353,7 @@ void Alg_smf_write::write_update(Alg_update_ptr update)
|
||||
int len = strlen(s);
|
||||
char smpteoffset[5];
|
||||
if (len < 24) return; // not long enough, must be bad format
|
||||
int fps;
|
||||
int fps = 0;
|
||||
if (s[0] == '2') {
|
||||
if (s[1] == '4') fps = 0;
|
||||
else if (s[1] == '5') fps = 1;
|
||||
|
||||
@@ -119,7 +119,7 @@ long Blip_Buffer::count_samples( blip_time_t t ) const
|
||||
|
||||
blip_time_t Blip_Buffer::count_clocks( long count ) const
|
||||
{
|
||||
if ( count > buffer_size_ )
|
||||
if ( count > (long) buffer_size_ )
|
||||
count = buffer_size_;
|
||||
|
||||
return ((count << BLIP_BUFFER_ACCURACY) - offset_ + (factor_ - 1)) / factor_;
|
||||
|
||||
@@ -229,13 +229,13 @@ inline long Blip_Buffer::sample_rate() const {
|
||||
|
||||
inline void Blip_Buffer::end_frame( blip_time_t t ) {
|
||||
offset_ += t * factor_;
|
||||
assert(( "Blip_Buffer::end_frame(): Frame went past end of buffer",
|
||||
samples_avail() <= (long) buffer_size_ ));
|
||||
/* assert(( "Blip_Buffer::end_frame(): Frame went past end of buffer",
|
||||
samples_avail() <= (long) buffer_size_ ));*/
|
||||
}
|
||||
|
||||
inline void Blip_Buffer::remove_silence( long count ) {
|
||||
assert(( "Blip_Buffer::remove_silence(): Tried to remove more samples than available",
|
||||
count <= samples_avail() ));
|
||||
/* assert(( "Blip_Buffer::remove_silence(): Tried to remove more samples than available",
|
||||
count <= samples_avail() ));*/
|
||||
offset_ -= blip_resampled_time_t (count) << BLIP_BUFFER_ACCURACY;
|
||||
}
|
||||
|
||||
|
||||
@@ -143,8 +143,8 @@ inline void Blip_Synth<quality,range>::offset_resampled( blip_resampled_time_t t
|
||||
typedef blip_pair_t_ pair_t;
|
||||
|
||||
unsigned sample_index = (time >> BLIP_BUFFER_ACCURACY) & ~1;
|
||||
assert(( "Blip_Synth/Blip_wave: Went past end of buffer",
|
||||
sample_index < blip_buf->buffer_size_ ));
|
||||
/* assert(( "Blip_Synth/Blip_wave: Went past end of buffer",
|
||||
sample_index < blip_buf->buffer_size_ ));*/
|
||||
enum { const_offset = Blip_Buffer::widest_impulse_ / 2 - width / 2 };
|
||||
pair_t* buf = (pair_t*) &blip_buf->buffer_ [const_offset + sample_index];
|
||||
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
// module. A failed requirement indicates a bug outside the module.
|
||||
// void require( bool expr );
|
||||
#undef require
|
||||
#define require( expr ) assert(( "unmet requirement", expr ))
|
||||
#define require( expr ) assert((/* "unmet requirement",*/ expr ))
|
||||
|
||||
// Like printf() except output goes to debug log file. Might be defined to do
|
||||
// nothing (not even evaluate its arguments).
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
*
|
||||
*/
|
||||
|
||||
#include <QtCore/QDebug>
|
||||
#include <QtCore/QTextStream>
|
||||
#include <QtGui/QLayout>
|
||||
#include <QtGui/QLabel>
|
||||
@@ -267,6 +268,8 @@ automatableModel * sf2Instrument::getChildModel( const QString & _modelName )
|
||||
{
|
||||
return &m_patchNum;
|
||||
}
|
||||
qCritical() << "requested unknown model " << _modelName;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user