-Integrated + fixed Clang analysis into buildTest

main
Harry van Haaren 2014-08-10 22:20:57 +01:00
parent a2fd2d7630
commit 2af4dd6dcd
7 changed files with 24 additions and 19 deletions

View File

@ -1,11 +1,10 @@
Luppp - OpenAV Productions
===============================
Link to official page: http://openavproductions.com/Luppp
Official page: http://openavproductions.com/Luppp
This is the repository of Luppp, the live looping tool.
![screenshot](https://raw.github.com/harryhaaren/openAV-Luppp/master/resources/screenshots/1.0.png "Luppp 1.0 Screenshot")
Intro

View File

@ -13,9 +13,11 @@ set -e
# setup environment: Copy material for tests to /tmp
cp -r ../src/tests/lupppTestMaterial /tmp
cmake -DBUILD_TESTS=1 ../
rm CMakeCache.txt
make -j 2
scan-build cmake -DBUILD_TESTS=1 ../
scan-build make -j 2
lcov --zerocounters --directory .

View File

@ -29,14 +29,16 @@ ControllerUpdater::ControllerUpdater()
void ControllerUpdater::registerController( Controller* controller )
{
if (!controller)
{
LUPPP_ERROR("Register Controller passed NULL controller!");
return;
}
//LUPPP_NOTE("Registering controller %s", controller->getName().c_str() );
// store the controller instance
c.push_back( controller );
// and tell it to register itself (MidiObserver / AudioObserver etc)
controller->registerComponents();
}

View File

@ -205,8 +205,10 @@ int DiskReader::loadSample( int track, int scene, string path )
// resample quality taken from config file,
int ret = src_simple ( &data, q, 1 );
LUPPP_NOTE("%s%i%s%i", "Resampling finished, from ", data.input_frames_used, " to ", data.output_frames_gen );
if ( ret == 0 )
LUPPP_NOTE("%s%i%s%i", "Resampling finished, from ", data.input_frames_used, " to ", data.output_frames_gen );
else
LUPPP_ERROR("%s%i%s%i", "Resampling finished, from ", data.input_frames_used, " to ", data.output_frames_gen );
/// exchange buffers, so buf contains the resampled audio
buf.swap( resampled );
@ -294,7 +296,7 @@ int DiskReader::loadSample( int track, int scene, string path )
}
cJSON_Delete( audioJson );
free ( sampleString );
delete[] sampleString;
free ( tmp );
}
else
@ -392,9 +394,11 @@ int DiskReader::readSession( std::string path )
int mr = readMaster();
if( tr == mr ){};
// cleanup
cJSON_Delete( sessionJson );
free ( sessionString );
delete[] sessionString;
return LUPPP_RETURN_OK;
}

View File

@ -22,8 +22,8 @@
#include "event.hxx"
#include <jack/ringbuffer.h>
extern char* processDspMem;
extern char* processGuiMem;
extern EventBase* processDspMem;
extern EventBase* processGuiMem;
extern jack_ringbuffer_t* rbToDsp;
extern jack_ringbuffer_t* rbToGui;

View File

@ -294,8 +294,6 @@ void GMasterTrack::setBarBeat(int b, int beat)
bar = bar % 4 + 1;
}
int num = (beat % 4) + 1;
// turn all off
for( int i = 0; i < 4; i++)
beatLights[i]->value( 0 );

View File

@ -32,8 +32,8 @@
int signalHanlderInt = 0;
char* processDspMem = 0;
char* processGuiMem = 0;
EventBase* processDspMem = 0;
EventBase* processGuiMem = 0;
jack_ringbuffer_t* rbToDsp = 0;
jack_ringbuffer_t* rbToGui = 0;
@ -62,7 +62,7 @@ int main(int argc, char** argv)
{
LUPPP_NOTE("Git: %s", GIT_VERSION );
bool runTests;
bool runTests = false;
if ( runTests ){} // remove unused warning if not built with BUILD_TESTS
for(int i = 0; i < argc; i++)
@ -83,8 +83,8 @@ int main(int argc, char** argv)
signal(SIGTERM, signalHanlder);
// allocate data to read from
processDspMem = (char*)malloc( sizeof(EventBase) );
processGuiMem = (char*)malloc( sizeof(EventBase) );
processDspMem = (EventBase*)malloc( sizeof(EventBase) );
processGuiMem = (EventBase*)malloc( sizeof(EventBase) );
rbToDsp = jack_ringbuffer_create( 5000 * sizeof(EventBase));
rbToGui = jack_ringbuffer_create( 5000 * sizeof(EventBase));
@ -98,8 +98,8 @@ int main(int argc, char** argv)
int testResult = 0;
// setup the testing Gui / JACK: Jack first, then GUI
Jack::setup("LupppTEST");
gui = new Gui( argv[0] );
Jack::setup("LupppTEST");
// test offline functionality
testResult += gui->getDiskReader()->runTests();