From: Takashi Iwai Date: Thu, 6 Apr 2006 17:03:16 +0000 (+0200) Subject: Allow negative coefficients in route plugin X-Git-Tag: v1.0.11rc5~5 X-Git-Url: https://git.alsa-project.org/?a=commitdiff_plain;h=8b79a9253767de10ea93ffc35c349ff0608f0173;p=alsa-lib.git Allow negative coefficients in route plugin Allow negative coefficients in route plugin (when handled as float). --- diff --git a/src/pcm/pcm_route.c b/src/pcm/pcm_route.c index a7f7699b..e49bdefd 100644 --- a/src/pcm/pcm_route.c +++ b/src/pcm/pcm_route.c @@ -794,7 +794,6 @@ static int route_load_ttable(snd_pcm_route_params_t *params, snd_pcm_stream_t st for (src_channel = 0; src_channel < sused; ++src_channel) { snd_pcm_route_ttable_entry_t v; v = ttable[src_channel * smul + dst_channel * dmul]; - assert(v >= 0 && v <= SND_PCM_PLUGIN_ROUTE_FULL); if (v != 0) { srcs[nsrcs].channel = src_channel; #if SND_PCM_PLUGIN_ROUTE_FLOAT @@ -802,6 +801,7 @@ static int route_load_ttable(snd_pcm_route_params_t *params, snd_pcm_stream_t st srcs[nsrcs].as_int = (v == SND_PCM_PLUGIN_ROUTE_FULL ? SND_PCM_PLUGIN_ROUTE_RESOLUTION : 0); srcs[nsrcs].as_float = v; #else + assert(v >= 0 && v <= SND_PCM_PLUGIN_ROUTE_FULL); srcs[nsrcs].as_int = v; #endif if (v != SND_PCM_PLUGIN_ROUTE_FULL)