From 4144d40b1a6fb5223e076b33b4cea82788bc3b89 Mon Sep 17 00:00:00 2001 From: waker Date: Tue, 14 Dec 2010 21:36:52 +0100 Subject: changed dsp plugin api to allow modification of any aspect of wave format --- plugins/supereq/supereq.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'plugins/supereq') diff --git a/plugins/supereq/supereq.c b/plugins/supereq/supereq.c index d3d83389..afa06359 100644 --- a/plugins/supereq/supereq.c +++ b/plugins/supereq/supereq.c @@ -75,27 +75,27 @@ supereq_plugin_stop (void) { } int -supereq_process (ddb_dsp_context_t *ctx, float *samples, int frames, int *samplerate, int *channels) { +supereq_process (ddb_dsp_context_t *ctx, float *samples, int frames, ddb_waveformat_t *fmt) { ddb_supereq_ctx_t *supereq = (ddb_supereq_ctx_t *)ctx; if (supereq->params_changed) { recalc_table (supereq); supereq->params_changed = 0; } - if (supereq->last_srate != *samplerate) { + if (supereq->last_srate != fmt->samplerate) { deadbeef->mutex_lock (supereq->mutex); - supereq->last_srate = *samplerate; - supereq->last_nch = *channels; + supereq->last_srate = fmt->samplerate; + supereq->last_nch = fmt->channels; recalc_table (supereq); deadbeef->mutex_unlock (supereq->mutex); equ_clearbuf(&supereq->state); } - else if (supereq->last_nch != *channels) { + else if (supereq->last_nch != fmt->channels) { deadbeef->mutex_lock (supereq->mutex); - supereq->last_nch = *channels; + supereq->last_nch = fmt->channels; deadbeef->mutex_unlock (supereq->mutex); equ_clearbuf(&supereq->state); } - equ_modifySamples_float(&supereq->state, (char *)samples,frames,*channels); + equ_modifySamples_float(&supereq->state, (char *)samples,frames,fmt->channels); return frames; } -- cgit v1.2.3