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
c84bae73
Commit
c84bae73
authored
5 years ago
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pcm/Convert: add option to enable the integer-only dsd2pcm implementation
parent
925b5954
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
42 additions
and
0 deletions
+42
-0
NEWS
NEWS
+1
-0
user.rst
doc/user.rst
+20
-0
Option.hxx
src/config/Option.hxx
+1
-0
Templates.cxx
src/config/Templates.cxx
+1
-0
Convert.cxx
src/pcm/Convert.cxx
+19
-0
No files found.
NEWS
View file @
c84bae73
...
@@ -22,6 +22,7 @@ ver 0.22 (not yet released)
...
@@ -22,6 +22,7 @@ ver 0.22 (not yet released)
- ffmpeg: new plugin based on FFmpeg's libavfilter library
- ffmpeg: new plugin based on FFmpeg's libavfilter library
- hdcd: new plugin based on FFmpeg's "af_hdcd" for HDCD playback
- hdcd: new plugin based on FFmpeg's "af_hdcd" for HDCD playback
- volume: convert S16 to S24 to preserve quality and reduce dithering noise
- volume: convert S16 to S24 to preserve quality and reduce dithering noise
- dsd: add integer-only DSD to PCM converter
* output
* output
- jack: add option "auto_destination_ports"
- jack: add option "auto_destination_ports"
- jack: report error details
- jack: report error details
...
...
This diff is collapsed.
Click to expand it.
doc/user.rst
View file @
c84bae73
...
@@ -568,6 +568,26 @@ Sometimes, music needs to be resampled before it can be played; for example, CDs
...
@@ -568,6 +568,26 @@ Sometimes, music needs to be resampled before it can be played; for example, CDs
Check the :ref:`resampler_plugins` reference for a list of resamplers
Check the :ref:`resampler_plugins` reference for a list of resamplers
and how to configure them.
and how to configure them.
DSD
^^^
There are three ways to play back DSD (Direct Stream Digital):
- natively if your output supports it (ALSA only and requires a sound
card with native DSD support)
- `DSD over PCM <http://dsd-guide.com/dop-open-standard>`_: wrapped
inside fake 24 bit PCM samples (ALSA and OSX only and requires an
external DAC with DoP support)
- for everything else, MPD automatically converts DSD to PCM
For the last option, the setting ``dsd2pcm_converter`` selects a
conversion method. The default is ``float`` which converts to
floating point samples. For CPUs with a weak floating point unit
(e.g. some ARMs like the one in the Raspberry Pi), it may be faster to
use ``integer``, which is an integer-only implementation of the
conversion algorithm.
Client Connections
Client Connections
------------------
------------------
...
...
This diff is collapsed.
Click to expand it.
src/config/Option.hxx
View file @
c84bae73
...
@@ -79,6 +79,7 @@ enum class ConfigOption {
...
@@ -79,6 +79,7 @@ enum class ConfigOption {
DESPOTIFY_USER
,
DESPOTIFY_USER
,
DESPOTIFY_PASSWORD
,
DESPOTIFY_PASSWORD
,
DESPOTIFY_HIGH_BITRATE
,
DESPOTIFY_HIGH_BITRATE
,
DSD2PCM_CONVERTER
,
MAX
MAX
};
};
...
...
This diff is collapsed.
Click to expand it.
src/config/Templates.cxx
View file @
c84bae73
...
@@ -75,6 +75,7 @@ const ConfigTemplate config_param_templates[] = {
...
@@ -75,6 +75,7 @@ const ConfigTemplate config_param_templates[] = {
{
"despotify_user"
,
false
,
true
},
{
"despotify_user"
,
false
,
true
},
{
"despotify_password"
,
false
,
true
},
{
"despotify_password"
,
false
,
true
},
{
"despotify_high_bitrate"
,
false
,
true
},
{
"despotify_high_bitrate"
,
false
,
true
},
{
"dsd2pcm_converter"
},
};
};
static
constexpr
unsigned
n_config_param_templates
=
static
constexpr
unsigned
n_config_param_templates
=
...
...
This diff is collapsed.
Click to expand it.
src/pcm/Convert.cxx
View file @
c84bae73
...
@@ -19,16 +19,35 @@
...
@@ -19,16 +19,35 @@
#include "Convert.hxx"
#include "Convert.hxx"
#include "ConfiguredResampler.hxx"
#include "ConfiguredResampler.hxx"
#include "config/Data.hxx"
#include "util/ConstBuffer.hxx"
#include "util/ConstBuffer.hxx"
#include "util/StringAPI.hxx"
#include <stdexcept>
#include <stdexcept>
#include <assert.h>
#include <assert.h>
#ifdef ENABLE_DSD
static
bool
dsd2pcm_integer
=
false
;
#endif
void
void
pcm_convert_global_init
(
const
ConfigData
&
config
)
pcm_convert_global_init
(
const
ConfigData
&
config
)
{
{
pcm_resampler_global_init
(
config
);
pcm_resampler_global_init
(
config
);
#ifdef ENABLE_DSD
dsd2pcm_integer
=
config
.
With
(
ConfigOption
::
DSD2PCM_CONVERTER
,
[](
const
char
*
s
){
if
(
s
==
nullptr
)
return
false
;
else
if
(
StringIsEqual
(
s
,
"float"
))
return
false
;
else
if
(
StringIsEqual
(
s
,
"integer"
))
return
true
;
else
throw
std
::
runtime_error
(
"Unrecognized value"
);
});
#endif
}
}
PcmConvert
::
PcmConvert
(
const
AudioFormat
_src_format
,
PcmConvert
::
PcmConvert
(
const
AudioFormat
_src_format
,
...
...
This diff is collapsed.
Click to expand it.
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