Skip to content

Commit e2a1265

Browse files
committed
minor tweaking + bugfix
tweaking: -increased gravity slightly -increased integral smoothing slightly -increased treble sensitivity bugfix: -alsa default device was fifo path and vice versa -no default alsa device was specified
1 parent 2276950 commit e2a1265

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

cava.c

+7-6
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,8 @@ Options:\n\
130130

131131
audio.format = -1;
132132
audio.rate = 0;
133-
133+
audio.source = "hw:1,1";
134+
134135
setlocale(LC_ALL, "");
135136

136137

@@ -154,11 +155,11 @@ Options:\n\
154155
inputMethod = optarg;
155156
if (strcmp(inputMethod, "alsa") == 0) {
156157
im = 1;
157-
audio.source = "/tmp/mpd.fifo";
158+
audio.source = "hw:1,1";
158159
}
159160
if (strcmp(inputMethod, "fifo") == 0) {
160161
im = 2;
161-
audio.source = "hw:1,1";
162+
audio.source = "/tmp/mpd.fifo";
162163
}
163164
if (im == 0) {
164165
fprintf(stderr,
@@ -339,7 +340,7 @@ Options:\n\
339340
if (bw < 1) bw = 1; //bars must have width
340341

341342
// process [smoothing]: calculate gravity
342-
g = ((float)height / 200) * pow((60 / (float)framerate), 2.5);
343+
g = ((float)height / 270) * pow((60 / (float)framerate), 2.5);
343344

344345
//if no bands are selected it tries to padd the default 20 if there is extra room
345346
if (autoband == 1) bands = bands + ((w - (bw * bands + bands - 1)) /
@@ -382,7 +383,7 @@ Options:\n\
382383

383384
// process: weigh signal to frequencies
384385
for (n = 0; n < bands;
385-
n++)k[n] = pow(fc[n],0.62) * ((float)height/(M*5000)) * 8;
386+
n++)k[n] = pow(fc[n],0.85) * ((float)height/(M*4000));
386387

387388

388389

@@ -522,7 +523,7 @@ Options:\n\
522523

523524
// process [smoothing]: integral
524525
for (o = 0; o < bands; o++) {
525-
fmem[o] = fmem[o] * 0.66 + f[o];
526+
fmem[o] = fmem[o] * 0.70 + f[o];
526527
f[o] = fmem[o];
527528

528529
if (f[o] < 1)f[o] = 1;

0 commit comments

Comments
 (0)