-Added GUI using NTK

main
Harry van Haaren 2013-04-20 11:50:30 +01:00
parent a29b8c720c
commit dbf259c433
5 changed files with 47 additions and 5 deletions

19
src/gui.cxx Normal file
View File

@ -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();
}

20
src/gui.hxx Normal file
View File

@ -0,0 +1,20 @@
#ifndef LUPPP_GUI
#define LUPPP_GUI
#include <FL/Fl.H>
#include <FL/Fl_Window.H>
#include <FL/Fl_Box.H>
class Gui
{
public:
Gui();
int show();
private:
Fl_Window* window;
Fl_Box* box;
};
#endif // LUPPP_GUI

View File

@ -62,7 +62,7 @@ int Jack::process (jack_nframes_t nframes)
for(uint i = 0; i < nframes; i++)
{
*output = *input;
*output++ = *input++;
}
return false;

View File

@ -7,6 +7,7 @@
#include <jack/ringbuffer.h>
// Internal
#include "gui.hxx"
#include "jack.hxx"
@ -25,7 +26,7 @@ int main()
jack->activate();
sleep(10);
Gui gui;
gui.show();
}

View File

@ -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')