Fixes #133 JackSendReturn defualt volume = 1.0f

DSP and GUI level defaults for JackSend are now 1, so when
you click the FX button, by default the audio will be routed
to the send, returned, and audible again. This is better UX.

Fixed 2 build warnings to do with string termination
This commit is contained in:
Harry van Haaren 2016-11-24 23:49:05 +00:00
parent f8d5ccf34d
commit 6440e19c57
2 changed files with 4 additions and 3 deletions

View file

@ -79,6 +79,7 @@ GTrack::GTrack(int x, int y, int w, int h, const char* l ) :
jackSendActivate.callback(gtrack_jacksendactivate_cb,this);
jackSendDial.align(FL_ALIGN_INSIDE);
jackSendDial.callback(gtrack_jacksend_cb,this);
jackSendDial.value(1.0);
//volBox.color( fl_rgb_color( 0,0,0 ) );
end(); // close the group

View file

@ -4,12 +4,12 @@
#include <assert.h>
extern Jack* jack;
JackSendReturn::JackSendReturn(int trackid, AudioProcessor *prev, jack_client_t *client)
:m_trackid(trackid), m_previousProcessor(prev)
:m_trackid(trackid), m_previousProcessor(prev), m_sendvol(1.0f)
{
char name[50];
sprintf(name, "Send_track_%d\0",trackid);
sprintf(name, "Send_track_%d\n",trackid);
m_sendport=jack_port_register(client,name,JACK_DEFAULT_AUDIO_TYPE,JackPortIsOutput,0);
sprintf(name, "Return_track_%d\0",trackid);
sprintf(name, "Return_track_%d\n",trackid);
m_returnport=jack_port_register(client,name,JACK_DEFAULT_AUDIO_TYPE,JackPortIsInput,0);
m_active=false;
m_counter=0;