Overlay/media-plugins/alsaequal/files/alsaequal-0.6-mixer.patch

69 lines
Diff
Raw Normal View History

diff -Nur b/ctl_equal.c a/ctl_equal.c
--- b/ctl_equal.c 2009-01-31 23:06:47.000000000 +0100
+++ a/ctl_equal.c 2014-09-15 16:14:37.218286376 +0200
@@ -263,7 +263,8 @@
for(i = 0; i < equal->num_input_controls; i++) {
if(equal->control_data->control[i].type == LADSPA_CNTRL_INPUT) {
index = equal->control_data->control[i].index;
- if(equal->klass->PortDescriptors[index] !=
+ if((equal->klass->PortDescriptors[index] &
+ (LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL)) !=
(LADSPA_PORT_INPUT | LADSPA_PORT_CONTROL)) {
SNDERR("Problem with control file %s, %d.", controls, index);
return -1;
@@ -284,12 +285,14 @@
}
/* Make sure that the control file makes sense */
- if(equal->klass->PortDescriptors[equal->control_data->input_index] !=
+ if((equal->klass->PortDescriptors[equal->control_data->input_index] &
+ (LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO))!=
(LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) {
SNDERR("Problem with control file %s.", controls);
return -1;
}
- if(equal->klass->PortDescriptors[equal->control_data->output_index] !=
+ if((equal->klass->PortDescriptors[equal->control_data->output_index] &
+ (LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO))!=
(LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) {
SNDERR("Problem with control file %s.", controls);
return -1;
diff -Nur b/ladspa_utils.c a/ladspa_utils.c
--- b/ladspa_utils.c 2009-01-31 22:57:41.000000000 +0100
+++ a/ladspa_utils.c 2014-09-15 16:18:49.061293401 +0200
@@ -354,10 +354,12 @@
default_controls->control[index].type = LADSPA_CNTRL_OUTPUT;
}
index++;
- } else if(psDescriptor->PortDescriptors[i] ==
+ } else if((psDescriptor->PortDescriptors[i] &
+ (LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) ==
(LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) {
default_controls->input_index = i;
- } else if(psDescriptor->PortDescriptors[i] ==
+ } else if((psDescriptor->PortDescriptors[i] &
+ (LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) ==
(LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) {
default_controls->output_index = i;
}
diff -Nur b/pcm_equal.c a/pcm_equal.c
--- b/pcm_equal.c 2010-02-01 23:55:00.000000000 +0100
+++ a/pcm_equal.c 2014-09-15 16:21:32.892297971 +0200
@@ -231,12 +231,14 @@
}
/* Make sure that the control file makes sense */
- if(equal->klass->PortDescriptors[equal->control_data->input_index] !=
+ if((equal->klass->PortDescriptors[equal->control_data->input_index] &
+ (LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) !=
(LADSPA_PORT_INPUT | LADSPA_PORT_AUDIO)) {
SNDERR("Problem with control file %s.", controls);
return -1;
}
- if(equal->klass->PortDescriptors[equal->control_data->output_index] !=
+ if((equal->klass->PortDescriptors[equal->control_data->output_index] &
+ (LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) !=
(LADSPA_PORT_OUTPUT | LADSPA_PORT_AUDIO)) {
SNDERR("Problem with control file %s.", controls);
return -1;