[mpd-devel] patch for extra sox recipes in SoxrResampler.cxx

Frederic Vanden Poel info at klinktbeter.be
Sun Oct 26 15:54:13 CET 2014


Forgot to CC the list

-------- Forwarded Message --------
Subject: 	Re: [mpd-devel] patch for extra sox recipes in SoxrResampler.cxx
Date: 	Sun, 26 Oct 2014 14:23:27 +0100
From: 	Frederic Vanden Poel <info at klinktbeter.be>
To: 	Max Kellermann <max at duempel.org>



On 25/10/2014 2:07, Max Kellermann wrote:
> On 2014/10/25 02:01, Frederic Vanden Poel <info at klinktbeter.be> wrote:
>> please find my patch attached.
> Patch has no description.
>
> When you submit a patch, don't write ANY text in the email.  If there
> is need for further explanation in the email body, it means there is
> not enough description in the patch file itself.
>
> (And an update for doc/user.xml is missing.)
>

Hello,

Here's a new version. Not sure how to properly format comments in the
heading lines of the patch, but the info should be

"add new soxr recipes: libsamplerate equivalent SOXR_LSR0Q, SOXR_LSR1Q
and SOXR_LSR2Q"

Please feel free to do the redaction of this patch.


-- 
Best regards,

Frederic Vanden Poel

Klinkt Beter
www.klinktbeter.be
info at klinktbeter.be

+32 473 79 36 91
Blauwe Paal 45
9230 Wetteren





-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.blarg.de/pipermail/mpd-devel/attachments/20141026/515cab99/attachment.html>
-------------- next part --------------
diff -ruN mpd-0.19.1/doc/user.xml mpd-0.19.1-new/doc/user.xml
--- mpd-0.19.1/doc/user.xml	2014-10-10 23:42:50.000000000 +0200
+++ mpd-0.19.1-new/doc/user.xml	2014-10-26 14:06:40.169040997 +0100
@@ -878,6 +878,36 @@
 
               <row>
                 <entry>
+                  "<parameter>soxr best sinc</parameter>"
+                </entry>
+                <entry>
+                  Use <application>libsoxr</application> with "SOXR_LSR0Q" recipe (Libsamplerate equivalent Best sinc).
+                  setting.
+                </entry>
+              </row>
+
+              <row>
+                <entry>
+                  "<parameter>soxr medium sinc</parameter>"
+                </entry>
+                <entry>
+                  Use <application>libsoxr</application> with "SOXR_LSR1Q" recipe (Libsamplerate equivalent Medium sinc).
+                  setting.
+                </entry>
+              </row>
+
+              <row>
+                <entry>
+                  "<parameter>soxr fast sinc</parameter>"
+                </entry>
+                <entry>
+                  Use <application>libsoxr</application> with "SOXR_LSR2Q" recipe (Libsamplerate equivalent Fast sinc).
+                  setting.
+                </entry>
+              </row>
+
+              <row>
+                <entry>
                   "<parameter>Best Sinc Interpolator</parameter>" or
                   "<parameter>0</parameter>"
                 </entry>
diff -ruN mpd-0.19.1/src/pcm/SoxrResampler.cxx mpd-0.19.1-new/src/pcm/SoxrResampler.cxx
--- mpd-0.19.1/src/pcm/SoxrResampler.cxx	2014-08-16 08:24:55.000000000 +0200
+++ mpd-0.19.1-new/src/pcm/SoxrResampler.cxx	2014-10-24 13:11:46.155652259 +0200
@@ -48,6 +48,12 @@
 		return "Low Quality";
 	case SOXR_QQ:
 		return "Quick";
+	case SOXR_LSR0Q:
+		return "Libsamplerate equivalent Best sinc";
+	case SOXR_LSR1Q:
+		return "Libsamplerate equivalent Medium sinc";
+	case SOXR_LSR2Q:
+		return "Libsamplerate equivalent Fast sinc";
 	}
 
 	gcc_unreachable();
@@ -76,6 +82,12 @@
 		soxr_quality_recipe = SOXR_LQ;
 	else if (strcmp(quality, "quick") == 0)
 		soxr_quality_recipe = SOXR_QQ;
+	else if (strcmp(quality, "best sinc") == 0)
+		soxr_quality_recipe = SOXR_LSR0Q;
+	else if (strcmp(quality, "medium sinc") == 0)
+		soxr_quality_recipe = SOXR_LSR1Q;
+	else if (strcmp(quality, "fast sinc") == 0)
+		soxr_quality_recipe = SOXR_LSR2Q;
 	else
 		return false;
 



More information about the mpd-devel mailing list