shithub: sox

Download patch

ref: e52b4115d87dc352f75eaaa7fe73ca771ce0fbd5
parent: 5fcdc8e4e0dc00bc84b819e28b41fb8307f8a5aa
author: rrt <rrt>
date: Sun Feb 4 18:43:59 EST 2007

Use range_limit macro rather than min and max

--- a/src/alsa.c
+++ b/src/alsa.c
@@ -254,7 +254,7 @@
     snd_pcm_hw_params_get_rate_min(hw_params, &min_rate, &dir);
     snd_pcm_hw_params_get_rate_max(hw_params, &max_rate, &dir);
 
-    rate = min(max(ft->signal.rate, min_rate), max_rate);
+    rate = range_limit(ft->signal.rate, min_rate, max_rate);
     if (rate != ft->signal.rate)
     {
         st_report("hardware does not support sample-rate %i; changing to %i.", ft->signal.rate, rate);