summaryrefslogtreecommitdiff
path: root/audio/cava/files/patch-cava.c
diff options
context:
space:
mode:
Diffstat (limited to 'audio/cava/files/patch-cava.c')
-rw-r--r--audio/cava/files/patch-cava.c52
1 files changed, 43 insertions, 9 deletions
diff --git a/audio/cava/files/patch-cava.c b/audio/cava/files/patch-cava.c
index 131d159988ae..e51adb46beb4 100644
--- a/audio/cava/files/patch-cava.c
+++ b/audio/cava/files/patch-cava.c
@@ -1,6 +1,6 @@
---- cava.c.orig 2020-06-24 19:18:09 UTC
+--- cava.c.orig 2020-10-07 16:30:24 UTC
+++ cava.c
-@@ -31,13 +31,11 @@
+@@ -36,13 +36,11 @@
#include "util.h"
#ifdef NCURSES
@@ -14,7 +14,7 @@
#include "input/alsa.h"
#include "input/common.h"
-@@ -90,8 +88,6 @@ void cleanup(void) {
+@@ -92,8 +90,6 @@ void cleanup(void) {
#else
;
#endif
@@ -23,7 +23,7 @@
}
}
-@@ -337,8 +333,12 @@ as of 0.4.0 all options are specified in config file,
+@@ -291,8 +287,12 @@ as of 0.4.0 all options are specified in config file,
if (strncmp(ttyname(0), "/dev/ttys", 9) == 0)
inAtty = 0;
if (inAtty) {
@@ -36,26 +36,60 @@
}
// We use unicode block characters to draw the bars and
-@@ -546,12 +546,6 @@ as of 0.4.0 all options are specified in config file,
+@@ -540,16 +540,6 @@ as of 0.4.0 all options are specified in config file,
height = lines * 8;
break;
#endif
- case OUTPUT_NONCURSES:
- get_terminal_dim_noncurses(&width, &lines);
+-
+- if (p.xaxis != NONE)
+- lines--;
+-
- init_terminal_noncurses(inAtty, p.col, p.bgcol, width, lines, p.bar_width);
-- height = (lines - 1) * 8;
+- height = lines * 8;
- break;
-
case OUTPUT_RAW:
if (strcmp(p.raw_target, "/dev/stdout") != 0) {
// checking if file exists
-@@ -997,10 +991,6 @@ as of 0.4.0 all options are specified in config file,
- p.gradient);
+@@ -785,11 +775,6 @@ as of 0.4.0 all options are specified in config file,
+ if (p.xaxis != NONE) {
+ x_axis_info = 1;
+ double center_frequency;
+- if (output_mode == OUTPUT_NONCURSES) {
+- printf("\r\033[%dB", lines + 1);
+- if (rest)
+- printf("\033[%dC", rest);
+- }
+ for (n = 0; n < number_of_bars; n++) {
+ if (p.stereo) {
+ if (n < number_of_bars / 2)
+@@ -815,16 +800,6 @@ as of 0.4.0 all options are specified in config file,
+ mvprintw(lines, n * (p.bar_width + p.bar_spacing) + rest, "%.1f",
+ freq_kilohz);
+ #endif
+- } else if (output_mode == OUTPUT_NONCURSES) {
+- if (center_frequency < 1000)
+- printf("%-4d", freq_floor);
+- else if (center_frequency > 1000 && center_frequency < 10000)
+- printf("%.2f", freq_kilohz);
+- else
+- printf("%.1f", freq_kilohz);
+-
+- if (n < number_of_bars - 1)
+- printf("\033[%dC", p.bar_width + p.bar_spacing - 4);
+ }
+ }
+ printf("\r\033[%dA", lines + 1);
+@@ -1124,11 +1099,6 @@ as of 0.4.0 all options are specified in config file,
+ p.gradient, x_axis_info);
break;
#endif
- case OUTPUT_NONCURSES:
- rc = draw_terminal_noncurses(inAtty, lines, width, number_of_bars, p.bar_width,
-- p.bar_spacing, rest, bars, previous_frame);
+- p.bar_spacing, rest, bars, previous_frame,
+- x_axis_info);
- break;
case OUTPUT_RAW:
rc = print_raw_out(number_of_bars, fp, p.is_bin, p.bit_format, p.ascii_range,