mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-05 09:01:39 -05:00
-Removed all warnings from compile
This commit is contained in:
parent
0306a1873e
commit
c2585b32a2
10 changed files with 27 additions and 51 deletions
|
@ -32,7 +32,7 @@
|
|||
|
||||
#include "../worker.hxx"
|
||||
#include "../looper.hxx"
|
||||
#include "../audiobuffer.hxx"./
|
||||
#include "../audiobuffer.hxx"
|
||||
#include "../eventhandler.hxx"
|
||||
|
||||
|
||||
|
|
|
@ -323,6 +323,8 @@ class SidechainGain : public Fl_Slider
|
|||
return Fl_Widget::handle(event);
|
||||
}
|
||||
*/
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
@ -97,11 +97,6 @@ class Volume : public Fl_Slider
|
|||
//cairo_set_source_rgb( cr, 28 / 255.f, 28 / 255.f , 28 / 255.f );
|
||||
cairo_fill( cr );
|
||||
|
||||
|
||||
// set up dashed lines, 1 px off, 1 px on
|
||||
double dashes[1];
|
||||
dashes[0] = 2.0;
|
||||
|
||||
//cairo_set_dash ( cr, dashes, 1, 0.0);
|
||||
cairo_set_line_width( cr, 1.0);
|
||||
|
||||
|
|
|
@ -5,6 +5,17 @@
|
|||
|
||||
extern Jack* jack;
|
||||
|
||||
|
||||
const char* StateString[8] = {
|
||||
"empty",
|
||||
"playing",
|
||||
"play queued",
|
||||
"loaded",
|
||||
"stop queued",
|
||||
"recording",
|
||||
"record queued"
|
||||
};
|
||||
|
||||
GridLogic::GridLogic()
|
||||
{
|
||||
|
||||
|
|
|
@ -36,16 +36,6 @@ class GridLogic : public TimeObserver
|
|||
STATE_RECORD_QUEUED,
|
||||
};
|
||||
|
||||
const char* StateString[8] = {
|
||||
"empty",
|
||||
"playing",
|
||||
"play queued",
|
||||
"loaded",
|
||||
"stop queued",
|
||||
"recording",
|
||||
"record queued"
|
||||
};
|
||||
|
||||
GridLogic();
|
||||
|
||||
/// button press / click event
|
||||
|
@ -68,6 +58,7 @@ class GridLogic : public TimeObserver
|
|||
/// contains the current state of each grid square
|
||||
State state[NTRACKS*NSCENES];
|
||||
|
||||
static const char* StateString[8];
|
||||
|
||||
};
|
||||
|
||||
|
|
17
src/jack.cxx
17
src/jack.cxx
|
@ -14,16 +14,17 @@ using namespace std;
|
|||
extern int jackSamplerate;
|
||||
|
||||
Jack::Jack() :
|
||||
clientActive(false),
|
||||
client( 0 ),
|
||||
controllerUpdater( new ControllerUpdater() ),
|
||||
client( jack_client_open ( "Luppp", JackNullOption , 0 , 0 ) ),
|
||||
timeManager(),
|
||||
metronome( new Metronome() ),
|
||||
logic( new Logic() ),
|
||||
gridLogic( new GridLogic() )
|
||||
gridLogic( new GridLogic() ),
|
||||
controllerUpdater( new ControllerUpdater() ),
|
||||
|
||||
clientActive(false)
|
||||
{
|
||||
/// open the client
|
||||
client = jack_client_open ( "Luppp", JackNullOption , 0 , 0 );
|
||||
//client = ;
|
||||
|
||||
buffers.nframes = jack_get_buffer_size( client );
|
||||
buffers.samplerate = jack_get_sample_rate( client );
|
||||
|
@ -173,7 +174,7 @@ int Jack::process (jack_nframes_t nframes)
|
|||
writeToGuiRingbuffer( &e );
|
||||
|
||||
// run each event trought the midiObservers vector
|
||||
for( int i = 0; i < midiObservers.size(); i++ )
|
||||
for(unsigned int i = 0; i < midiObservers.size(); i++ )
|
||||
{
|
||||
midiObservers.at(i)->midi( (unsigned char*) &in_event.buffer[0] );
|
||||
}
|
||||
|
@ -183,7 +184,7 @@ int Jack::process (jack_nframes_t nframes)
|
|||
}
|
||||
|
||||
/// process each track, starting at output and working up signal path
|
||||
for(uint i = 0; i < NTRACKS; i++)
|
||||
for(unsigned int i = 0; i < NTRACKS; i++)
|
||||
{
|
||||
trackOutputs.at(i)->process( nframes, &buffers );
|
||||
}
|
||||
|
@ -222,7 +223,7 @@ int Jack::process (jack_nframes_t nframes)
|
|||
uiUpdateCounter += nframes;
|
||||
|
||||
|
||||
for(int i = 0; i < buffers.nframes; i++)
|
||||
for(unsigned int i = 0; i < buffers.nframes; i++)
|
||||
{
|
||||
float tmp = 0.f;
|
||||
for(int t = 0; t < NTRACKS; t++)
|
||||
|
|
|
@ -61,6 +61,8 @@ class Jack
|
|||
void writeApcOutput( unsigned char* data );
|
||||
|
||||
private:
|
||||
jack_client_t* client;
|
||||
|
||||
Buffers buffers;
|
||||
TimeManager timeManager;
|
||||
Metronome* metronome;
|
||||
|
@ -84,7 +86,6 @@ class Jack
|
|||
|
||||
// JACK member variables
|
||||
bool clientActive;
|
||||
jack_client_t* client;
|
||||
|
||||
jack_port_t* masterInput;
|
||||
jack_port_t* masterOutputL;
|
||||
|
|
|
@ -180,7 +180,6 @@ void Looper::setSample(int scene, AudioBuffer* ab)
|
|||
|
||||
void Looper::process(int nframes, Buffers* buffers)
|
||||
{
|
||||
float* in = buffers->audio[Buffers::MASTER_INPUT];
|
||||
float* out = buffers->audio[Buffers::TRACK_0 + track];
|
||||
|
||||
// process each clip individually: this allows for playback of one clip,
|
||||
|
@ -239,7 +238,7 @@ void Looper::process(int nframes, Buffers* buffers)
|
|||
}
|
||||
playPoint += 1.0; //playbackSpeed;
|
||||
|
||||
//*out++ = sin( playPoint * 440 * 6.24 );
|
||||
//out++ = sin( playPoint * 440 * 6.24 );
|
||||
*trk = tmpBuffer[i];
|
||||
*out++ = *trk++;
|
||||
}
|
||||
|
@ -255,18 +254,6 @@ void Looper::process(int nframes, Buffers* buffers)
|
|||
}
|
||||
uiUpdateCounter += nframes;
|
||||
}
|
||||
/*
|
||||
// stopRecordOnBar ensures we record right up to the bar measure
|
||||
else if ( state == STATE_RECORDING || stopRecordOnBar )
|
||||
{
|
||||
for(int i = 0; i < nframes; i++)
|
||||
{
|
||||
if ( lastWrittenSampleIndex < SAMPLE_SIZE )
|
||||
{
|
||||
sample[lastWrittenSampleIndex++] = in[i];
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
}
|
||||
|
||||
|
|
|
@ -75,7 +75,6 @@ class LooperClip
|
|||
writeToGuiRingbuffer( &e );
|
||||
}
|
||||
|
||||
printf("New buffer size = %i\n", ab->getData().size() );
|
||||
_buffer = ab;
|
||||
|
||||
_newBufferInTransit = false;
|
||||
|
|
|
@ -36,17 +36,6 @@ namespace Worker
|
|||
return 0;
|
||||
}
|
||||
|
||||
/// allocates a new audiobuffer of the desired size and returns it
|
||||
static AudioBuffer* allocateNewBuffer(int size)
|
||||
{
|
||||
AudioBuffer* ab = new AudioBuffer();
|
||||
|
||||
std::vector<float> buf( size, 0.f );
|
||||
|
||||
ab->nonRtSetSample( buf );
|
||||
|
||||
return ab;
|
||||
}
|
||||
}
|
||||
|
||||
#endif // LUPPP_WORKER_H
|
||||
|
|
Loading…
Add table
Reference in a new issue