revise WidgetContainer
This commit is contained in:
50
gdigi.c
50
gdigi.c
@@ -95,12 +95,12 @@ gboolean open_device()
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void send_data(char *data, int lenght)
|
||||
void send_data(char *data, int length)
|
||||
{
|
||||
if (output == NULL)
|
||||
open_device();
|
||||
|
||||
snd_rawmidi_write(output, data, lenght);
|
||||
snd_rawmidi_write(output, data, length);
|
||||
}
|
||||
|
||||
void check_preset(struct usb_dev_handle *handle)
|
||||
@@ -154,6 +154,7 @@ void check_preset(struct usb_dev_handle *handle)
|
||||
*/
|
||||
void set_option(guint id, guint position, guint value)
|
||||
{
|
||||
sleep(3);
|
||||
static char option[] = {0xF0, 0x00, 0x00, 0x10, 0x00, 0x5E, 0x02, 0x41,
|
||||
0x00, 0x00, 0x00, /* ID */
|
||||
0x00, /* position */
|
||||
@@ -221,21 +222,11 @@ void set_option(guint id, guint position, guint value)
|
||||
}
|
||||
}
|
||||
|
||||
void set_wah_type(int type)
|
||||
{
|
||||
set_option(WAH_TYPE, WAH_POSITION, type);
|
||||
}
|
||||
|
||||
void set_wah_on_off(gboolean val)
|
||||
{
|
||||
set_option(WAH_ON_OFF, WAH_POSITION, (val == TRUE) ? 1 : 0);
|
||||
}
|
||||
|
||||
void set_comp_type(int type)
|
||||
{
|
||||
set_option(COMP_TYPE, COMP_POSITION, type);
|
||||
}
|
||||
|
||||
void set_comp_on_off(gboolean val)
|
||||
{
|
||||
set_option(COMP_ON_OFF, COMP_POSITION, (val == TRUE) ? 1 : 0);
|
||||
@@ -263,21 +254,11 @@ void switch_system_preset(int x)
|
||||
send_data(switch_preset, sizeof(switch_preset));
|
||||
}
|
||||
|
||||
void set_pickup_type(int type)
|
||||
{
|
||||
set_option(PICKUP_TYPE, PICKUP_POSITION, type);
|
||||
}
|
||||
|
||||
void set_pickup_on_off(gboolean val)
|
||||
{
|
||||
set_option(PICKUP_ON_OFF, PICKUP_POSITION, (val == TRUE) ? 1 : 0);
|
||||
}
|
||||
|
||||
void set_dist_type(int type)
|
||||
{
|
||||
set_option(DIST_TYPE, DIST_POSITION, type);
|
||||
}
|
||||
|
||||
void set_dist_on_off(gboolean val)
|
||||
{
|
||||
set_option(DIST_ON_OFF, DIST_POSITION, (val == TRUE) ? 1 : 0);
|
||||
@@ -289,51 +270,26 @@ void set_preset_level(int level)
|
||||
set_option(PRESET_LEVEL, PRESET_POSITION, level);
|
||||
}
|
||||
|
||||
void set_eq_type(int type)
|
||||
{
|
||||
set_option(EQ_TYPE, EQ_POSITION, type);
|
||||
}
|
||||
|
||||
void set_eq_on_off(gboolean val)
|
||||
{
|
||||
set_option(EQ_ON_OFF, EQ_POSITION, (val == TRUE) ? 1 : 0);
|
||||
}
|
||||
|
||||
void set_noisegate_type(int type)
|
||||
{
|
||||
set_option(NOISEGATE_TYPE, NOISEGATE_POSITION, type);
|
||||
}
|
||||
|
||||
void set_noisegate_on_off(gboolean val)
|
||||
{
|
||||
set_option(NOISEGATE_ON_OFF, NOISEGATE_POSITION, (val == TRUE) ? 1 : 0);
|
||||
}
|
||||
|
||||
void set_chorusfx_type(int type)
|
||||
{
|
||||
set_option(CHORUSFX_TYPE, CHORUSFX_POSITION, type);
|
||||
}
|
||||
|
||||
void set_chorusfx_on_off(gboolean val)
|
||||
{
|
||||
set_option(CHORUSFX_ON_OFF, CHORUSFX_POSITION, (val == TRUE) ? 1 : 0);
|
||||
}
|
||||
|
||||
void set_delay_type(int type)
|
||||
{
|
||||
set_option(DELAY_TYPE, DELAY_POSITION, type);
|
||||
}
|
||||
|
||||
void set_delay_on_off(gboolean val)
|
||||
{
|
||||
set_option(DELAY_ON_OFF, DELAY_POSITION, (val == TRUE) ? 1 : 0);
|
||||
}
|
||||
|
||||
void set_reverb_type(int type)
|
||||
{
|
||||
set_option(REVERB_TYPE, REVERB_POSITION, type);
|
||||
}
|
||||
|
||||
void set_reverb_on_off(gboolean val)
|
||||
{
|
||||
set_option(REVERB_ON_OFF, REVERB_POSITION, (val == TRUE) ? 1 : 0);
|
||||
|
||||
Reference in New Issue
Block a user