-Werror checked all code

This commit is contained in:
Harry van Haaren 2013-07-30 01:17:40 +01:00
parent 89b89b81eb
commit 88fbe5a249
7 changed files with 17 additions and 53 deletions

View file

@ -105,8 +105,6 @@ class Unit : public Fl_Button
cairo_save( cr );
int drawY = y;
cairo_rectangle( cr, x+2, y + 2, w - 2, h - 2 );
cairo_set_source_rgba(cr, 66 / 255.f, 66 / 255.f , 66 / 255.f, 0.4);
cairo_fill(cr);

View file

@ -22,24 +22,24 @@ class ControllerUpdater
void mute(int t, bool b)
{
for(int i = 0; i < c.size(); i++) c.at(i)->mute(t,b);
for(unsigned int i = 0; i < c.size(); i++) c.at(i)->mute(t,b);
}
void clipSelect(int t, int clip, Controller::ClipMode cm)
{
for(int i = 0; i < c.size(); i++)
for(unsigned int i = 0; i < c.size(); i++)
c.at(i)->clipSelect(t,clip,cm);
}
void recordArm(int t, bool r)
{
for(int i = 0; i < c.size(); i++)
for(unsigned int i = 0; i < c.size(); i++)
c.at(i)->recordArm(t,r);
}
void volume(int t, float v)
{
for(int i = 0; i < c.size(); i++) c.at(i)->volume(t,v);
for(unsigned int i = 0; i < c.size(); i++) c.at(i)->volume(t,v);
}
private:

View file

@ -23,12 +23,6 @@
using namespace std;
static void gmastertrack_button_callback(Fl_Widget *w, void *data) {
int track = 0;
if ( data )
track = *(int*)data;
if ( strcmp( w->label(), "Metro" ) == 0 )
{
Avtk::Button* b = (Avtk::Button*)w;
@ -45,7 +39,7 @@ static void gmastertrack_button_callback(Fl_Widget *w, void *data) {
}
else if ( strcmp( w->label(), "Tap" ) == 0 )
{
Avtk::Button* b = (Avtk::Button*)w;
//Avtk::Button* b = (Avtk::Button*)w;
EventTimeTempoTap e;
writeToDspRingbuffer( &e );
}
@ -65,9 +59,10 @@ class GMasterTrack : public Fl_Group
clipSel(x + 5, y + 26 + 102, 140, 294,""),
source(x+5, y+26, 140, 100, ""),
volBox(x+5, y+422, 140, 172, ""),
source(x+5, y+26, 140, 100, ""),
tapTempo(x + 25 + 52, y + 26 + 4, 63, 29,"Tap"),
metronomeButton(x + 9,y + 26 + 4, 64, 29,"Metro"),

View file

@ -18,37 +18,6 @@
using namespace std;
static void gunittrack_button_callback(Fl_Widget *w, void *data) {
int track = 0;
if ( data )
track = *(int*)data;
if ( strcmp( w->label(), "Metro" ) == 0 )
{
Avtk::Button* b = (Avtk::Button*)w;
b->value( !b->value() );
EventMetronomeActive e = EventMetronomeActive( b->value() );
writeToDspRingbuffer( &e );
}
else if ( strcmp( w->label(), "BPM" ) == 0 )
{
Avtk::Dial* b = (Avtk::Dial*)w;
float bpm = b->value() * 160 + 60; // 60 - 220
EventTimeBPM e = EventTimeBPM( bpm );
writeToDspRingbuffer( &e );
}
else if ( strcmp( w->label(), "Tap" ) == 0 )
{
Avtk::Button* b = (Avtk::Button*)w;
EventTimeTempoTap e;
writeToDspRingbuffer( &e );
}
else
{
cout << __FILE__ << __LINE__ << " Error: unknown command string" << endl;
}
}
class GUnitTrack : public Fl_Group
{
public:

View file

@ -146,7 +146,7 @@ int Jack::process (jack_nframes_t nframes)
writeToGuiRingbuffer( &e );
// check each looper for MIDI match
for(int i = 0; i < loopers.size(); i++)
for(unsigned int i = 0; i < loopers.size(); i++)
loopers.at(i)->midi( (unsigned char*)&in_event.buffer[0] );
masterMidiInputIndex++;
@ -156,6 +156,7 @@ int Jack::process (jack_nframes_t nframes)
for(uint i = 0; i < NTRACKS; i++)
loopers.at(i)->process( nframes, &buffers );
/*
// process fx
float* buf[] = {
buffers.audio[Buffers::REVERB],
@ -163,6 +164,7 @@ int Jack::process (jack_nframes_t nframes)
buffers.audio[Buffers::REVERB],
buffers.audio[Buffers::REVERB],
};
*/
//reverbMeter->process(nframes, buffers.audio[Buffers::REVERB], buffers.audio[Buffers::REVERB] );
//reverb->process( nframes, &buf[0], &buf[2] );

View file

@ -11,16 +11,16 @@ extern Jack* jack;
Looper::Looper(int t) :
track(t),
scene(0),
state(STATE_STOPPED),
scene(0),
fpb(120),
gain(1.f),
numBeats (4),
playedBeats(0),
stopRecordOnBar(false),
endPoint (0),
playPoint (0),
lastWrittenSampleIndex(0)
lastWrittenSampleIndex(0),
playPoint (0)
{
// pre-zero the internal sample
for(int i = 0; i < 10; i++)
@ -160,7 +160,7 @@ void Looper::setSample(int sc, AudioBuffer* ab)
numBeats = ab->getBeats();
float* s = &sample[sc];
float* b = &buf[0];
for (int i = 0; i < buf.size(); i++)
for (unsigned int i = 0; i < buf.size(); i++)
{
*s++ = *b++;
}
@ -305,7 +305,7 @@ void Looper::pitchShift(int count, float* input, float* output)
float fSlow2 = (1.0f / crossfadeSize);
float fSlow3 = (fSlow0 - 1);
float* input0 = &input[0];
float* output0 = &output[0];
//float* output0 = &output[0];
for (int i=0; i<count; i++)
{

View file

@ -16,9 +16,9 @@ class Metronome : public Observer
{
public:
Metronome() :
playPoint (0),
playBar (false),
active (false)
active (false),
playPoint (0)
{
// create beat and bar samples
endPoint = (44100.f/441);