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
d7f024c5
Commit
d7f024c5
authored
Oct 25, 2014
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
OutputThread: fall back to PCM if given DSD sample rate is not supported
Works around the "PCM conversion from f to dsd is not implemented" error message that prevents DSD playback.
parent
bc5a5357
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
0 deletions
+31
-0
NEWS
NEWS
+1
-0
OutputThread.cxx
src/output/OutputThread.cxx
+30
-0
No files found.
NEWS
View file @
d7f024c5
...
...
@@ -4,6 +4,7 @@ ver 0.19.2 (not yet released)
- ffmpeg: recognize MIME type audio/aacp
* output
- fix memory leak after filter initialization error
- fall back to PCM if given DSD sample rate is not supported
* fix assertion failure on unsupported PCM conversion
* auto-disable plugins that require GLib when --disable-glib is used
...
...
src/output/OutputThread.cxx
View file @
d7f024c5
...
...
@@ -22,6 +22,7 @@
#include "OutputAPI.hxx"
#include "Domain.hxx"
#include "pcm/PcmMix.hxx"
#include "pcm/Domain.hxx"
#include "notify.hxx"
#include "filter/FilterInternal.hxx"
#include "filter/plugins/ConvertFilterPlugin.hxx"
...
...
@@ -165,6 +166,10 @@ AudioOutput::Open()
out_audio_format
.
ApplyMask
(
config_audio_format
);
mutex
.
unlock
();
const
AudioFormat
retry_audio_format
=
out_audio_format
;
retry_without_dsd
:
success
=
ao_plugin_open
(
this
,
out_audio_format
,
error
);
mutex
.
lock
();
...
...
@@ -189,6 +194,31 @@ AudioOutput::Open()
mutex
.
unlock
();
ao_plugin_close
(
this
);
if
(
error
.
IsDomain
(
pcm_domain
)
&&
out_audio_format
.
format
==
SampleFormat
::
DSD
)
{
/* if the audio output supports DSD, but not
the given sample rate, it asks MPD to
resample; resampling DSD however is not
implemented; our last resort is to give up
DSD and fall back to PCM */
// TODO: clean up this workaround
FormatError
(
output_domain
,
"Retrying without DSD"
);
out_audio_format
=
retry_audio_format
;
out_audio_format
.
format
=
SampleFormat
::
FLOAT
;
/* clear the Error to allow reusing it */
error
.
Clear
();
/* sorry for the "goto" - this is a workaround
for the stable branch that should be as
unintrusive as possible */
goto
retry_without_dsd
;
}
CloseFilter
();
mutex
.
lock
();
...
...
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