mirror of
https://github.com/vale981/openAV-Luppp
synced 2025-03-04 08:41:39 -05:00
-Updating prints, fixed bug in diskwriter
This commit is contained in:
parent
a12eef7974
commit
a99ad9048c
7 changed files with 14 additions and 14 deletions
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
@ -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);
|
||||
|
@ -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 );
|
||||
}
|
||||
|
|
|
@ -128,7 +128,7 @@ 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,
|
||||
|
@ -136,7 +136,7 @@ Jack::Jack() :
|
|||
(JackTimebaseCallback)static_timebase,
|
||||
static_cast<void*>(this)) )
|
||||
{
|
||||
cerr << "Jack() error setting timebase callback" << endl;
|
||||
LUPPP_ERROR("%s","Error setting timebase callback");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -49,7 +49,6 @@ void Metronome::bar()
|
|||
void Metronome::beat()
|
||||
{
|
||||
playPoint = 0;
|
||||
//cout << "Looper " << track << " got beat()" << flush;
|
||||
}
|
||||
|
||||
void Metronome::setFpb(int f)
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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 );
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue