-Updated GUI to activate JACK using callback

main
Harry van Haaren 2013-07-30 22:02:14 +01:00
parent 43aec20f82
commit 58d75b16a0
2 changed files with 15 additions and 4 deletions

View File

@ -4,6 +4,7 @@
#include <sstream>
#include "jack.hxx"
#include "audiobuffer.hxx"
// include the header.c file in the planning dir:
@ -18,6 +19,7 @@ int AudioBuffer::privateID = 0;
using namespace std;
extern Gui* gui;
extern Jack* jack;
void luppp_tooltip(std::string s)
@ -46,6 +48,12 @@ static void gui_static_read_rb(void* inst)
Fl::repeat_timeout( 1 / 30.f, &gui_static_read_rb, inst);
}
static void gui_jack_activate(void* inst)
{
cout << "GUI: Jack activate called now\n" << endl;
jack->activate();
}
Gui::Gui() :
window(1110,650)
{
@ -87,7 +95,9 @@ int Gui::show()
{
window.show();
gui_static_read_rb( this);
gui_static_read_rb( this );
Fl::repeat_timeout( 1, &gui_jack_activate, 0 );
return Fl::run();
}

View File

@ -36,12 +36,13 @@ int main()
rbToGui = jack_ringbuffer_create( 5000 * sizeof(EventBase));
jack = new Jack();
gui = new Gui();
jack->activate();
jack = new Jack();
//jack->activate();
gui->show();
}