Skip to content

Commit

Permalink
-Updating prints, fixed bug in diskwriter
Browse files Browse the repository at this point in the history
  • Loading branch information
harryhaaren committed Sep 23, 2013
1 parent a12eef7 commit a99ad90
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
9 changes: 6 additions & 3 deletions scrapeFixme.sh
@@ -1,12 +1,15 @@
rm FIXME

echo -e "\n===> Samplerate hardcoded:\n" > FIXME
grep -irn "44100" src/ >> FIXME
grep -irnI "44100" src/ >> FIXME

echo -e "\n\n\n===> FIXME" >> FIXME
grep -irn "FIXME" src/ >> FIXME
grep -irnI "FIXME" src/ >> FIXME

echo -e "\n\n\n===> TODO" >> FIXME
grep -irn "TODO" src/ >> FIXME
grep -irnI "TODO" src/ >> FIXME

echo -e "\n\n\n===> Prints" >> FIXME
grep -irnI "cout" src/ >> FIXME

geany FIXME
2 changes: 1 addition & 1 deletion src/diskwriter.cxx
Expand Up @@ -99,7 +99,7 @@ int DiskWriter::writeAudioBuffer(int track, int scene, AudioBuffer* ab )
stringstream path;
path << audioDir << "/" << filename.str();

SndfileHandle outfile( path.str(), SFM_WRITE, SF_FORMAT_WAV | SF_FORMAT_FLOAT, 1, 44100);
SndfileHandle outfile( path.str(), SFM_WRITE, SF_FORMAT_WAV | SF_FORMAT_FLOAT, 1, gui->samplerate );
cout << "Worker::writeSample() " << path.str() << " size: " << ab->getAudioFrames() << endl;

// FIXME: the size of the buffer is bigger than the audio contained in it:
Expand Down
4 changes: 1 addition & 3 deletions src/gui.cxx
Expand Up @@ -53,7 +53,6 @@ void close_cb(Fl_Widget*o, void*)
}
static void gui_static_read_rb(void* inst)
{
//cout << "read gui" << endl;
handleGuiEvents();
Fl::repeat_timeout( 1 / 30.f, &gui_static_read_rb, inst);
}
Expand Down Expand Up @@ -91,7 +90,6 @@ static void gui_header_callback(Fl_Widget *w, void *data)
}
else if ( strcmp(m->label(), "Load Session") == 0 )
{
cout << "Load clicked" << endl;
Fl_Native_File_Chooser fnfc;
fnfc.title("Load Session");
fnfc.type(Fl_Native_File_Chooser::BROWSE_DIRECTORY);
Expand All @@ -113,8 +111,8 @@ static void gui_header_callback(Fl_Widget *w, void *data)
const char* name = fl_input( "Save session as", gui->getDiskWriter()->getLastSaveName().c_str() );
if ( name )
{
cout << "Save clicked, name = " << name << endl;
gui->getDiskWriter()->initialize( getenv("HOME"), name );
LUPPP_NOTE("%s %s","Saving session as ", name.c_str() );
EventStateSave e;
writeToDspRingbuffer( &e );
}
Expand Down
4 changes: 2 additions & 2 deletions src/jack.cxx
Expand Up @@ -128,15 +128,15 @@ Jack::Jack() :
static_process,
static_cast<void*>(this)) )
{
cerr << "Jack() error setting process callback" << endl;
LUPPP_ERROR("%s","Error setting process callback");
}

if ( jack_set_timebase_callback(client,
0,
(JackTimebaseCallback)static_timebase,
static_cast<void*>(this)) )
{
cerr << "Jack() error setting timebase callback" << endl;
LUPPP_ERROR("%s","Error setting timebase callback");
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/looper.cxx
Expand Up @@ -33,7 +33,7 @@ Looper::Looper(int t) :
fpb = 22050;

// init faust pitch shift variables
fSamplingFreq = 44100;
fSamplingFreq = jack->getSamplerate();
IOTA = 0;

//tmpRecordBuffer.resize(MAX_BUFFER_SIZE);
Expand Down
1 change: 0 additions & 1 deletion src/metronome.cxx
Expand Up @@ -49,7 +49,6 @@ void Metronome::bar()
void Metronome::beat()
{
playPoint = 0;
//cout << "Looper " << track << " got beat()" << flush;
}

void Metronome::setFpb(int f)
Expand Down
6 changes: 3 additions & 3 deletions src/timemanager.cxx
Expand Up @@ -39,7 +39,7 @@ int TimeManager::getFpb()
void TimeManager::setBpm(float bpm)
{
#ifdef DEBUG_TIME
cout << "setBpm() " << bpm << endl;
LUPPP_NOTE("%s %f","setBpm()",bpm);
#endif
setFpb( samplerate / bpm * 60 );
}
Expand All @@ -48,7 +48,7 @@ void TimeManager::setBpm(float bpm)
void TimeManager::setFpb(float f)
{
fpb = f;
//cout << "setFpb() " << fpb << endl;
//LUPPP_NOTE("%s %f","setFpb()", fpb);

int bpm = ( samplerate * 60) / f;

Expand All @@ -68,7 +68,7 @@ void TimeManager::setFpb(float f)

void TimeManager::registerObserver(TimeObserver* o)
{
//cout << "registerObserver() " << o << endl;
//LUPPP_NOTE("%s","registerObserver()");
observers.push_back(o);
o->setFpb( fpb );

Expand Down

0 comments on commit a99ad90

Please sign in to comment.