• R/O
  • HTTP
  • SSH
  • HTTPS

timidity41: Commit


Commit MetaInfo

Revisión93ecd0db995067814a27bec8aa5c733ad3e8f500 (tree)
Tiempo2020-03-26 23:47:20
AutorStarg <starg@user...>
CommiterStarg

Log Message

Merge branch 'unkotim' into dev41

Cambiar Resumen

Diferencia incremental

--- a/timidity/effect.c
+++ b/timidity/effect.c
@@ -2506,23 +2506,9 @@ static void do_drive_mono(Drive *drv, DATA_T *inout)
25062506 int32 index;
25072507 FLOAT_T in, sign, v1, v2, fp;
25082508
2509- static FLOAT_T max = 0, avg = 0, sum = 0;
2510- static int32 tc = 0;
2511-
2512-
2513-
2514-
25152509 in = *inout;
25162510 sign = (in < 0) ? (-1.0) : (1.0);
25172511 in *= drv->cnv * sign;
2518-
2519- if(in > 1 && in > max)
2520- max = in;
2521- ++tc;
2522- sum += in;
2523- avg = sum / (FLOAT_T)tc;
2524-
2525-
25262512 fp = floor(in);
25272513 index = fp;
25282514 fp = in - fp;
--- a/timidity/effect.h
+++ b/timidity/effect.h
@@ -505,9 +505,9 @@ int32
505505 in: 0.0 ~ 8.0 (1.0: 1<<(DRIVE_INPUT_BIT) , DRIVE_SCALE_BIT+DRIVE_BASE_BIT+FRACTION_BITS < 30bit
506506 out: 0.0 ~ 8.0 * clip_level
507507 */
508-#define DRIVE_SCALE_BIT (3) // 1.0 * 2^MATH_SCALE_BIT
508+#define DRIVE_SCALE_BIT (2) // 1.0 * 2^MATH_SCALE_BIT
509509 #define DRIVE_SCALE_MAX (1 << DRIVE_SCALE_BIT) // table max 1.0 * MATH_SCALE_MAX
510-#define DRIVE_BASE_BIT (6) // 0.0~1.0 table size
510+#define DRIVE_BASE_BIT (8) // 0.0~1.0 table size
511511 #define DRIVE_BASE_LENGTH (1 << (DRIVE_BASE_BIT)) // 0.0~1.0:table size
512512 #define DRIVE_TABLE_LENGTH (1 << (DRIVE_BASE_BIT + DRIVE_SCALE_BIT)) // 0.0~1.0 * MATH_SCALE_MAX table size
513513 #define DRIVE_FRAC_BIT (14) // for int32
--- a/timidity/thread_effect.c
+++ b/timidity/thread_effect.c
@@ -1970,6 +1970,8 @@ void init_effect_buffer_thread(void)
19701970 memset(delay_effect_buffer_sub, 0, sizeof(delay_effect_buffer_sub));
19711971 memset(reverb_effect_buffer_sub, 0, sizeof(reverb_effect_buffer_sub));
19721972
1973+ memset(master_effect_buffer_thread, 0, sizeof(master_effect_buffer_thread));
1974+
19731975 reset_effect_thread_var();
19741976 }
19751977
Show on old repository browser