summaryrefslogtreecommitdiff
path: root/plugins/supereq
diff options
context:
space:
mode:
authorGravatar waker <wakeroid@gmail.com>2011-01-24 21:18:57 +0100
committerGravatar waker <wakeroid@gmail.com>2011-01-24 21:18:57 +0100
commit7f34f84a31375eea905004cc412bbc434649d06e (patch)
tree428e8d005c7e57f93cda9917209d0a556f8adbf8 /plugins/supereq
parent966bf6d2f2fbddb7eb70ac0fd18e0ba8157dd1cb (diff)
fixed supereq glitch on 1st track
Diffstat (limited to 'plugins/supereq')
-rw-r--r--plugins/supereq/Equ.cpp8
-rw-r--r--plugins/supereq/supereq.c13
2 files changed, 15 insertions, 6 deletions
diff --git a/plugins/supereq/Equ.cpp b/plugins/supereq/Equ.cpp
index 369d0fcc..ba127f91 100644
--- a/plugins/supereq/Equ.cpp
+++ b/plugins/supereq/Equ.cpp
@@ -105,6 +105,14 @@ extern "C" void equ_init(SuperEqState *state, int wb, int channels)
state->outbuf = (REAL *)calloc(state->tabsize*state->channels,sizeof(REAL));
state->ditherbuf = (REAL *)malloc(sizeof(REAL)*DITHERLEN);
+ memset (state->lires1, 0, sizeof(REAL)*state->tabsize * state->channels);
+ memset (state->lires2, 0, sizeof(REAL)*state->tabsize * state->channels);
+ memset (state->irest, 0, sizeof(REAL)*state->tabsize);
+ memset (state->fsamples, 0, sizeof(REAL)*state->tabsize);
+ memset (state->finbuf, 0, state->winlen*state->channels*sizeof(REAL));
+ memset (state->outbuf, 0, state->tabsize*state->channels*sizeof(REAL));
+ memset (state->ditherbuf, 0, sizeof(REAL)*DITHERLEN);
+
state->lires = state->lires1;
state->cur_ires = 1;
state->chg_ires = 1;
diff --git a/plugins/supereq/supereq.c b/plugins/supereq/supereq.c
index ca3b4ec3..34fc6d41 100644
--- a/plugins/supereq/supereq.c
+++ b/plugins/supereq/supereq.c
@@ -81,12 +81,13 @@ supereq_process (ddb_dsp_context_t *ctx, float *samples, int frames, int maxfram
}
supereq->enabled = ctx->enabled;
- DB_playItem_t *it = deadbeef->streamer_get_playing_track ();
- if (it) {
- float playpos = deadbeef->streamer_get_playpos ();
- deadbeef->streamer_seek (playpos);
- deadbeef->pl_item_unref (it);
- }
+// this causes a glitch on 1st track
+// DB_playItem_t *it = deadbeef->streamer_get_playing_track ();
+// if (it) {
+// float playpos = deadbeef->streamer_get_playpos ();
+// deadbeef->streamer_seek (playpos);
+// deadbeef->pl_item_unref (it);
+// }
}
if (supereq->params_changed) {
recalc_table (supereq);