Commit fe2c5af8 authored by Monty Montgomery's avatar Monty Montgomery

Move multicompander from 10,20,30 band to 5,10,20 band

Fix several average-slider bugs in multicompand



git-svn-id: https://svn.xiph.org/trunk/postfish@7966 0101bb08-14d6-0310-b084-bc0e0c8e3800
parent 5fd277dd
This diff is collapsed.
......@@ -794,7 +794,7 @@ static gboolean configure(GtkWidget *widget, GdkEventConfigure *event){
return TRUE;
}
static void vals_bound(Multibar *m){
static void partial_vals_bound(Multibar *m){
int i;
if(m->thumbsmall>0 && m->thumblarge>0)
......@@ -806,6 +806,10 @@ static void vals_bound(Multibar *m){
if(m->thumbval[i]>m->thumbhi)m->thumbval[i]=m->thumbhi;
m->thumbpixel[i]=val_to_pixel(m,m->thumbval[i]);
}
}
static void vals_bound(Multibar *m){
partial_vals_bound(m);
if(m->thumbfocus>=0){
float v=m->thumbval[m->thumbfocus];
......@@ -1160,7 +1164,7 @@ void multibar_thumb_set(Multibar *m,float v, int n){
{
m->thumbval[n]=v;
vals_bound(m);
partial_vals_bound(m);
v=m->thumbval[n];
x=m->thumbpixel[n]=val_to_pixel(m,v);
m->thumbval[n]=v;
......@@ -1265,3 +1269,10 @@ void multibar_thumb_increment(Multibar *m,float small, float large){
draw_and_expose(w);
}
int multibar_thumb_grab_p(Multibar *m){
return m->widgetfocus;
}
int multibar_thumb_focus(Multibar *m){
return m->thumbfocus;
}
......@@ -124,9 +124,11 @@ void multibar_callback (Multibar *m,
void (*callback)
(GtkWidget *,gpointer),
gpointer);
float multibar_get_value(Multibar *m,int n);
void multibar_thumb_bounds(Multibar *m,float lo, float hi);
void multibar_thumb_increment(Multibar *m,float small, float large);
float multibar_get_value (Multibar *m,int n);
void multibar_thumb_bounds (Multibar *m,float lo, float hi);
void multibar_thumb_increment (Multibar *m,float small, float large);
int multibar_thumb_grab_p (Multibar *m);
int multibar_thumb_focus (Multibar *m);
G_END_DECLS
......
......@@ -23,26 +23,26 @@
#include "postfish.h"
#define multicomp_freqs_max 30
#define multicomp_freqs_max 20
#define multicomp_banks 3
static const int multicomp_freqs[multicomp_banks]={10,20,30};
static const int multicomp_freqs[multicomp_banks]={10,20,5};
static const float multicomp_freq_list[multicomp_banks][multicomp_freqs_max+1]={
{31.5,63,125,250,500,1000,2000,4000,8000,16000,9e10},
{31.5,44,63,88,125,175,250,350,500,700,1000,1400,
2000,2800,4000,5600,8000,11000,16000,22000},
{25,31.5,40,50,63,80,100,125,160,200,250,315,
400,500,630,800,1000,1250,1600,2000,2500,3150,4000,5000,6300,
8000,10000,12500,16000,20000,9e10}
2000,2800,4000,5600,8000,11000,16000,20000,9e10},
{31.5,125,500,2000,8000,9e10},
};
static char * const multicomp_freq_labels[multicomp_banks][multicomp_freqs_max]={
{"31.5","63","125","250","500","1k","2k","4k","8k","16k"},
{"31.5","44","63","88","125","175","250","350","500","700","1k","1.4k",
"2k","2.8k","4k","5.6k","8k","11k","16k","22k"},
{"25","31.5","40","50","63","80","100","125","160","200","250","315",
"400","500","630","800","1k","1.2k","1.6k","2k","2.5k","3.1k","4k","5k",
"6.3k","8k","10k","12.5k","16k","20k"}
"2k","2.8k","4k","5.6k","8k","11k","16k","20k"},
{"31.5","125","500","2k","8k"},
};
typedef struct {
......
#define VERSION "$Id$ "
/* DO NOT EDIT: Automated versioning hack [Sun Oct 10 02:55:28 EDT 2004] */
/* DO NOT EDIT: Automated versioning hack [Sun Oct 10 19:06:35 EDT 2004] */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment