Rear depth changes..

This commit is contained in:
Jaroslav Kysela 1999-08-10 08:39:26 +00:00
parent f3c4578afa
commit 13963ab1e1
5 changed files with 19 additions and 2 deletions

View file

@ -643,6 +643,9 @@ static void mixer_3d_effect1_value(unsigned int effect, int val)
case SND_MIXER_EFF1_FEEDBACK:
Xelement->element.data.teffect1.feedback = val;
break;
case SND_MIXER_EFF1_DEPTH_REAR:
Xelement->element.data.teffect1.depth_rear = val;
break;
default:
yyerror("Unknown effect 0x%x\n", effect);
}

View file

@ -859,7 +859,7 @@ static void soundcard_setup_write_mixer_element(FILE * out, struct mixer_element
fprintf(out, "%sdelay=%i", idx++ > 0 ? "," : "", element->data.teffect1.delay);
if (element->data.teffect1.effect & SND_MIXER_EFF1_FEEDBACK)
fprintf(out, "%sfeedback=%i", idx++ > 0 ? "," : "", element->data.teffect1.feedback);
if (element->data.teffect1.depth_rear & SND_MIXER_EFF1_DEPTH_REAR)
if (element->data.teffect1.effect & SND_MIXER_EFF1_DEPTH_REAR)
fprintf(out, "%sdepth_rear=%i", idx++ > 0 ? "," : "", element->data.teffect1.depth_rear);
fprintf(out, "))\n");
break;

View file

@ -639,6 +639,10 @@ int show_element_info(void *handle, snd_mixer_eid_t *eid, const char *space)
printf("%sFeedback: Min %i, Max %i\n", space,
info.data.teffect1.min_feedback,
info.data.teffect1.max_feedback);
if (info.data.teffect1.effect & SND_MIXER_EFF1_DEPTH_REAR)
printf("%sDepth rear: Min %i, Max %i\n", space,
info.data.teffect1.min_depth_rear,
info.data.teffect1.max_depth_rear);
break;
default:
printf("%sInfo handler for type %i is not available\n", space, info.eid.type);
@ -776,6 +780,8 @@ int show_element_contents(void *handle, snd_mixer_eid_t *eid, const char *space)
printf("%sDelay: %s\n", space, get_percent(element.data.teffect1.delay, info.data.teffect1.min_delay, info.data.teffect1.max_delay));
if (element.data.teffect1.effect & SND_MIXER_EFF1_FEEDBACK)
printf("%sFeedback: %s\n", space, get_percent(element.data.teffect1.feedback, info.data.teffect1.min_feedback, info.data.teffect1.max_feedback));
if (element.data.teffect1.effect & SND_MIXER_EFF1_DEPTH_REAR)
printf("%sDepth rear: %s\n", space, get_percent(element.data.teffect1.depth_rear, info.data.teffect1.min_depth_rear, info.data.teffect1.max_depth_rear));
break;
default:
printf("%sRead handler for type %i is not available\n", space, element.eid.type);

View file

@ -180,6 +180,10 @@ void s_e_chk( s_element *e ) {
e->adj[6]->value=(gfloat)e->e.data.teffect1.feedback;
gtk_signal_emit_by_name(GTK_OBJECT(e->adj[6]),"value_changed");
}
if( e->info.data.teffect1.effect & SND_MIXER_EFF1_DEPTH_REAR ) {
e->adj[7]->value=(gfloat)e->e.data.teffect1.depth_rear;
gtk_signal_emit_by_name(GTK_OBJECT(e->adj[7]),"value_changed");
}
break;
}
}

View file

@ -2,7 +2,7 @@
#include "gamix.h"
static gchar *label_3d[]={
"wide","volume","center","space","depth","delay","feedback"};
"wide","volume","center","space","depth","delay","feedback", "depth rear"};
static void close_callback(GtkWidget *,s_mixer *);
static void volume1_callback(GtkAdjustment *,s_element *);
@ -221,6 +221,9 @@ static void vol_3d_callback(GtkAdjustment *adj,s_element *e) {
case 6:
v=&e->e.data.teffect1.feedback;
break;
case 7:
v=&e->e.data.teffect1.depth_rear;
break;
}
value=(int)adj->value;
if( v ) {
@ -703,6 +706,7 @@ gint mk_element(s_element *e,GtkBox *iv_box) {
MIX_3D_VOL(4,depth,min_depth,max_depth,SND_MIXER_EFF1_DEPTH);
MIX_3D_VOL(5,delay,min_delay,max_delay,SND_MIXER_EFF1_DELAY);
MIX_3D_VOL(6,feedback,min_feedback,max_feedback,SND_MIXER_EFF1_FEEDBACK);
MIX_3D_VOL(7,depth_rear,min_depth_rear,max_depth_rear,SND_MIXER_EFF1_DEPTH_REAR);
break;
}
gtk_widget_show(ih_box);