Load system config for 'smooth_parameters.glsl'
This commit is contained in:
@@ -27,10 +27,10 @@
|
||||
output is jagged and sporadic.
|
||||
- hybrid uses the results from both `average` and `maximum`
|
||||
with the weight provided in `SAMPLE_HYBRID_WEIGHT` */
|
||||
#define SAMPLE_MODE average
|
||||
//#define SAMPLE_MODE average
|
||||
/* Weight should be provided in the range (0, 1). Higher values favour
|
||||
averaged results. `hybrid` mode only. */
|
||||
#define SAMPLE_HYBRID_WEIGHT 0.65
|
||||
//#define SAMPLE_HYBRID_WEIGHT 0.65
|
||||
|
||||
/* Factor used to scale frequencies. Lower values allows lower
|
||||
frequencies to occupy more space. */
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
#define PI 3.14159265359
|
||||
#endif
|
||||
|
||||
#include "@smooth_parameters.glsl"
|
||||
#include ":smooth_parameters.glsl"
|
||||
|
||||
/* window value t that resides in range [0, sz)*/
|
||||
@@ -43,6 +44,7 @@ float smooth_audio(in sampler1D tex, int tex_sz, highp float idx) {
|
||||
smax = scale_audio(clamp(idx + SMOOTH_FACTOR, 0, 1)) * tex_sz;
|
||||
float m = ((smax - smin) / 2.0F), s, w;
|
||||
float rm = smin + m; /* middle */
|
||||
|
||||
#if SAMPLE_MODE == average
|
||||
float avg = 0, weight = 0;
|
||||
for (s = smin; s <= smax; s += 1.0F) {
|
||||
|
||||
Reference in New Issue
Block a user