Attach patch enables DSD128 playback for the dsf DSD decoder.
Patch is against mpd-0.18.

NB it seems the dsdiff decoder in mpd-0.18 has problems detecting files
(tested on F19 x86_64). Can anyone confirm?

Jurgen
>From 4fb59871f937dd215cfce5cf16f8cd547aa71f9a Mon Sep 17 00:00:00 2001
From: Jurgen Kramer <gtmkra...@xs4all.nl>
Date: Mon, 4 Nov 2013 13:20:09 +0100
Subject: [PATCH] Allow DSD128 for dsf

---
 src/decoder/DsfDecoderPlugin.cxx | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/decoder/DsfDecoderPlugin.cxx b/src/decoder/DsfDecoderPlugin.cxx
index 065bc79..dff6ef0 100644
--- a/src/decoder/DsfDecoderPlugin.cxx
+++ b/src/decoder/DsfDecoderPlugin.cxx
@@ -128,12 +128,12 @@ dsf_read_metadata(Decoder *decoder, InputStream &is,
 	uint32_t samplefreq = FromLE32(dsf_fmt_chunk.sample_freq);
 
 	/* for now, only support version 1 of the standard, DSD raw stereo
-	   files with a sample freq of 2822400 Hz */
+	   files with a sample freq of 2822400 or 5644800 Hz*/
 
 	if (dsf_fmt_chunk.version != 1 || dsf_fmt_chunk.formatid != 0
 	    || dsf_fmt_chunk.channeltype != 2
 	    || dsf_fmt_chunk.channelnum != 2
-	    || samplefreq != 2822400)
+	    || (samplefreq != 2822400 && samplefreq != 5644800))
 		return false;
 
 	uint32_t chblksize = FromLE32(dsf_fmt_chunk.block_size);
-- 
1.8.3.1

------------------------------------------------------------------------------
November Webinars for C, C++, Fortran Developers
Accelerate application performance with scalable programming models. Explore
techniques for threading, error checking, porting, and tuning. Get the most 
from the latest Intel processors and coprocessors. See abstracts and register
http://pubads.g.doubleclick.net/gampad/clk?id=60136231&iu=/4140/ostg.clktrk
_______________________________________________
Musicpd-dev-team mailing list
Musicpd-dev-team@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/musicpd-dev-team

Reply via email to