# HG changeset patch # User ertzing # Date 1180301494 25200 # Node ID 1c7ee5ed3a103a0875c5f0f615a2c494d1ee3a90 # Parent 49bcc73492955a607c7ddecde1e1c45adb07917b [svn] Move effect plugin handling into the main thread diff -r 49bcc7349295 -r 1c7ee5ed3a10 ChangeLog --- a/ChangeLog Sat May 26 09:18:11 2007 -0700 +++ b/ChangeLog Sun May 27 14:31:34 2007 -0700 @@ -1,3 +1,12 @@ +2007-05-26 16:18:11 +0000 Michael Farber <01mf02@gmail.com> + revision [4646] + - Fixed some very visible errors in German translation + + + trunk/po/de.po | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + + 2007-05-26 12:47:35 +0000 Michael Farber <01mf02@gmail.com> revision [4644] - Made stuff prettier diff -r 49bcc7349295 -r 1c7ee5ed3a10 src/audacious/build_stamp.c --- a/src/audacious/build_stamp.c Sat May 26 09:18:11 2007 -0700 +++ b/src/audacious/build_stamp.c Sun May 27 14:31:34 2007 -0700 @@ -1,2 +1,2 @@ #include -const gchar *svn_stamp = "20070526-4644"; +const gchar *svn_stamp = "20070526-4646"; diff -r 49bcc7349295 -r 1c7ee5ed3a10 src/audacious/output.c --- a/src/audacious/output.c Sat May 26 09:18:11 2007 -0700 +++ b/src/audacious/output.c Sun May 27 14:31:34 2007 -0700 @@ -34,6 +34,8 @@ #include "playlist.h" #include "configdb.h" +#include "effect.h" + #include #ifdef USE_SRC @@ -425,7 +427,11 @@ guint myorder = G_BYTE_ORDER == G_LITTLE_ENDIAN ? FMT_S16_LE : FMT_S16_BE; int caneq = (fmt == FMT_S16_NE || fmt == myorder); OutputPlugin *op = get_current_output_plugin(); + EffectPlugin *ep = get_current_effect_plugin(); int writeoffs; + AFormat new_format; + gint new_rate; + gint new_nch; #ifdef USE_SRC if(src_state != NULL&&length > 0) @@ -488,6 +494,34 @@ /* do vis plugin(s) */ input_add_vis_pcm(time, fmt, nch, length, ptr); + /* do effect plugin(s) */ + if (effects_enabled() && ep && ep->query_format) { + new_format = op_state.fmt; + new_rate = op_state.rate; + new_nch = op_state.nch; + + ep->query_format(&new_format, &new_rate, &new_nch); + + if (new_format != op_state.fmt || + new_rate != op_state.rate || + new_nch != op_state.nch) { + /* + * The effect plugin changes the stream format. Reopen the + * audio device. + */ + if (0 == output_open_audio(new_format, new_rate, new_nch)) { + /* + * Fatal error. + */ + return; + } + } + } + + if (effects_enabled() && ep && ep->mod_samples) + length = ep->mod_samples(&ptr, length, op_state.fmt, + op_state.rate, op_state.nch); + writeoffs = 0; while (writeoffs < length) {