diff options
author | Alexey Yakovenko <wakeroid@gmail.com> | 2010-03-20 19:18:10 +0100 |
---|---|---|
committer | Alexey Yakovenko <wakeroid@gmail.com> | 2010-03-20 19:18:10 +0100 |
commit | 36d106e54d4b7a390a464a93f9c48320f2cb2e1d (patch) | |
tree | 1d1cb1b41662e8d04b2919fa7502bcc0e01c8532 /plugins/supereq | |
parent | 175c96d5246f3bbdb8ddd5c9379191d030a9848b (diff) |
less blocking in EQ
Diffstat (limited to 'plugins/supereq')
-rw-r--r-- | plugins/supereq/supereq.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/plugins/supereq/supereq.c b/plugins/supereq/supereq.c index ed9bc43b..2e1a1ae1 100644 --- a/plugins/supereq/supereq.c +++ b/plugins/supereq/supereq.c @@ -17,6 +17,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ #include <stdio.h> +#include <string.h> #include "../../deadbeef.h" #include "supereq.h" @@ -75,8 +76,18 @@ supereq_plugin_stop (void) { void supereq_regen_table_thread (void *param) { void *params = paramlist_alloc (); + + deadbeef->mutex_lock (mutex); + float lbands_copy[18]; + float rbands_copy[18]; + float srate = last_srate; + memcpy (lbands_copy, lbands, sizeof (lbands)); + memcpy (rbands_copy, rbands, sizeof (rbands)); + deadbeef->mutex_unlock (mutex); + + equ_makeTable (lbands_copy, rbands_copy, params, srate); + deadbeef->mutex_lock (mutex); - equ_makeTable (lbands, rbands, params, last_srate); paramlist_free (paramsroot); paramsroot = params; deadbeef->mutex_unlock (mutex); |