diff --git a/src/gui.cxx b/src/gui.cxx new file mode 100644 index 0000000..0f178cd --- /dev/null +++ b/src/gui.cxx @@ -0,0 +1,19 @@ + + +#include "gui.hxx" + +Gui::Gui() +{ + window = new Fl_Window(340,180); + box = new Fl_Box(20,40,300,100,"Luppp 5"); + box->box(FL_UP_BOX); + box->labelsize(36); + box->labeltype(FL_SHADOW_LABEL); + window->end(); +} + +int Gui::show() +{ + window->show(); + return Fl::run(); +} diff --git a/src/gui.hxx b/src/gui.hxx new file mode 100644 index 0000000..e7d7ff0 --- /dev/null +++ b/src/gui.hxx @@ -0,0 +1,20 @@ + +#ifndef LUPPP_GUI +#define LUPPP_GUI + +#include +#include +#include + +class Gui +{ + public: + Gui(); + int show(); + + private: + Fl_Window* window; + Fl_Box* box; +}; + +#endif // LUPPP_GUI diff --git a/src/jack.cxx b/src/jack.cxx index 9e6b89e..d7ca755 100644 --- a/src/jack.cxx +++ b/src/jack.cxx @@ -62,7 +62,7 @@ int Jack::process (jack_nframes_t nframes) for(uint i = 0; i < nframes; i++) { - *output = *input; + *output++ = *input++; } return false; diff --git a/src/main.cxx b/src/main.cxx index ec96445..84f1e0a 100644 --- a/src/main.cxx +++ b/src/main.cxx @@ -7,6 +7,7 @@ #include // Internal +#include "gui.hxx" #include "jack.hxx" @@ -25,7 +26,7 @@ int main() jack->activate(); - sleep(10); - + Gui gui; + gui.show(); } diff --git a/wscript b/wscript index 9121fa6..88b6d2f 100644 --- a/wscript +++ b/wscript @@ -12,15 +12,17 @@ def options(opt): def configure(conf): conf.load('compiler_cxx') conf.env.append_value('CXXFLAGS', ['-g', '-Wall']) #'-O2' + conf.check_cfg(package='ntk',at_least_version='1.3',args='--cflags --libs',uselib_store='NTK') conf.check_cfg(package='jack',at_least_version='0.118',args='--cflags --libs',uselib_store='JACK') #conf.check_cfg(package='lilv-0',at_least_version='1.0',args='--cflags --libs',uselib_store='LILV') #conf.check_cfg(package='sndfile',at_least_version='1.0',args='--cflags --libs',uselib_store='SNDFILE') def build(bld): - sources = ['src/main.cxx', + sources = ['src/gui.cxx', + 'src/main.cxx', 'src/jack.cxx', 'src/eventhandlerdsp.cxx'] - bld.program(source = sources, target='luppp5', use='JACK') + bld.program(source = sources, target='luppp5', use='JACK NTK')