Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
M
mpd
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Иван Мажукин
mpd
Commits
9b9d189a
Commit
9b9d189a
authored
Jul 04, 2014
by
Jurgen Kramer
Committed by
Max Kellermann
Aug 16, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
decoder/dsf: Allow up to DSD512. Enable DSD rates based on Fs=48kHz
parent
7c3af4f5
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
28 additions
and
1 deletion
+28
-1
NEWS
NEWS
+1
-0
DsdLib.cxx
src/decoder/plugins/DsdLib.cxx
+19
-0
DsdLib.hxx
src/decoder/plugins/DsdLib.hxx
+7
-0
DsfDecoderPlugin.cxx
src/decoder/plugins/DsfDecoderPlugin.cxx
+1
-1
No files found.
NEWS
View file @
9b9d189a
...
...
@@ -40,6 +40,7 @@ ver 0.19 (not yet released)
- audiofile: support scanning remote files
- audiofile: log libaudiofile errors
- dsdiff, dsf: report bit rate
- dsf: support DSD512
- sndfile: support scanning remote files
- sndfile: support tags "comment", "album", "track", "genre"
- mp4v2: support playback of MP4 files.
...
...
src/decoder/plugins/DsdLib.cxx
View file @
9b9d189a
...
...
@@ -82,6 +82,25 @@ dsdlib_skip(Decoder *decoder, InputStream &is,
return
decoder_skip
(
decoder
,
is
,
delta
);
}
bool
dsdlib_valid_freq
(
uint32_t
samplefreq
)
{
switch
(
samplefreq
)
{
case
2822400
:
/* DSD64, 64xFs, Fs = 44.100kHz */
case
3072000
:
/* DSD64 with Fs = 48.000 kHz */
case
5644800
:
case
6144000
:
case
11289600
:
case
12288000
:
case
22579200
:
/* DSD512 */
case
24576000
:
return
true
;
default
:
return
false
;
}
}
#ifdef HAVE_ID3TAG
void
dsdlib_tag_id3
(
InputStream
&
is
,
...
...
src/decoder/plugins/DsdLib.hxx
View file @
9b9d189a
...
...
@@ -67,6 +67,13 @@ dsdlib_skip(Decoder *decoder, InputStream &is,
uint64_t
delta
);
/**
* Check if the sample frequency is a valid DSD frequency.
**/
gcc_const
bool
dsdlib_valid_freq
(
uint32_t
samplefreq
);
/**
* Add tags from ID3 tag. All tags commonly found in the ID3 tags of
* DSF and DSDIFF files are imported
*/
...
...
src/decoder/plugins/DsfDecoderPlugin.cxx
View file @
9b9d189a
...
...
@@ -131,7 +131,7 @@ dsf_read_metadata(Decoder *decoder, InputStream &is,
if
(
dsf_fmt_chunk
.
version
!=
1
||
dsf_fmt_chunk
.
formatid
!=
0
||
dsf_fmt_chunk
.
channeltype
!=
2
||
dsf_fmt_chunk
.
channelnum
!=
2
||
(
samplefreq
!=
2822400
&&
samplefreq
!=
5644800
))
||
(
!
dsdlib_valid_freq
(
samplefreq
)
))
return
false
;
uint32_t
chblksize
=
FromLE32
(
dsf_fmt_chunk
.
block_size
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment