Fixed invert default behaviour for radial, closes #111
This commit is contained in:
2
glava.c
2
glava.c
@@ -182,7 +182,7 @@ static const char* help_str =
|
||||
" appropriate backend will be used for the underlying windowing\n"
|
||||
" system.\n"
|
||||
"-a, --audio=BACKEND specifies an audio input backend to use.\n"
|
||||
"-p, --pipe=[BIND[:TYPE]] binds value(s) to be read from stdin. The input my be read using\n"
|
||||
"-p, --pipe[=BIND[:TYPE]] binds value(s) to be read from stdin. The input my be read using\n"
|
||||
" `@name` or `@name:default` syntax within shader sources.\n"
|
||||
" A stream of inputs (each overriding the previous) must be\n"
|
||||
" assigned with the `name = value` syntax and separated by\n"
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
#define COLOR (#cc3333 * ((d / 40) + 1))
|
||||
/* Angle (in radians) for how much to rotate the visualizer */
|
||||
#define ROTATE (PI / 2)
|
||||
/* Whether to switch left/right audio buffers */
|
||||
/* Whether to swap left/right audio buffers, set to 1 to enable */
|
||||
#define INVERT 0
|
||||
/* Aliasing factors. Higher values mean more defined and jagged lines.
|
||||
Note: aliasing does not have a notable impact on performance, but requires
|
||||
|
||||
@@ -64,7 +64,7 @@ void main() {
|
||||
float dir = mod(abs(idx), TWOPI); /* absolute position, [0, 2pi) */
|
||||
if (dir > PI)
|
||||
idx = -sign(idx) * (TWOPI - dir); /* Re-correct position values to [-pi, pi) */
|
||||
if (INVERT > 0)
|
||||
#if INVERT == 0
|
||||
idx = -idx; /* Invert if needed */
|
||||
float pos = int(abs(idx) / section) / float(NBARS / 2); /* bar position, [0, 1) */
|
||||
#define smooth_f(tex) smooth_audio(tex, audio_sz, pos) /* smooth function format */
|
||||
|
||||
Reference in New Issue
Block a user