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
111528e5
Commit
111528e5
authored
Feb 26, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/alsa: add #ifdef ENABLE_DSD
Fixes the --disable-dsd build. See
http://bugs.musicpd.org/view.php?id=4498
parent
5628dcf4
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
AlsaOutputPlugin.cxx
src/output/plugins/AlsaOutputPlugin.cxx
+20
-2
No files found.
src/output/plugins/AlsaOutputPlugin.cxx
View file @
111528e5
...
...
@@ -67,12 +67,14 @@ struct AlsaOutput {
/** use memory mapped I/O? */
bool
use_mmap
;
#ifdef ENABLE_DSD
/**
* Enable DSD over PCM according to the DoP standard standard?
*
* @see http://dsd-guide.com/dop-open-standard
*/
bool
dop
;
#endif
/** libasound's buffer_time setting (in microseconds) */
unsigned
int
buffer_time
;
...
...
@@ -161,9 +163,12 @@ struct AlsaOutput {
void
Cancel
();
private
:
#ifdef ENABLE_DSD
bool
SetupDop
(
AudioFormat
audio_format
,
PcmExport
::
Params
&
params
,
Error
&
error
);
#endif
bool
SetupOrDop
(
AudioFormat
&
audio_format
,
Error
&
error
);
int
Recover
(
int
err
);
...
...
@@ -189,9 +194,11 @@ AlsaOutput::Configure(const ConfigBlock &block, Error &error)
use_mmap
=
block
.
GetBlockValue
(
"use_mmap"
,
false
);
#ifdef ENABLE_DSD
dop
=
block
.
GetBlockValue
(
"dop"
,
false
)
||
/* legacy name from MPD 0.18 and older: */
block
.
GetBlockValue
(
"dsd_usb"
,
false
);
#endif
buffer_time
=
block
.
GetBlockValue
(
"buffer_time"
,
MPD_ALSA_BUFFER_TIME_US
);
...
...
@@ -672,6 +679,8 @@ error:
return
false
;
}
#ifdef ENABLE_DSD
inline
bool
AlsaOutput
::
SetupDop
(
const
AudioFormat
audio_format
,
PcmExport
::
Params
&
params
,
...
...
@@ -713,16 +722,25 @@ AlsaOutput::SetupDop(const AudioFormat audio_format,
return
true
;
}
#endif
inline
bool
AlsaOutput
::
SetupOrDop
(
AudioFormat
&
audio_format
,
Error
&
error
)
{
PcmExport
::
Params
params
;
params
.
alsa_channel_order
=
true
;
#ifdef ENABLE_DSD
params
.
dop
=
dop
&&
audio_format
.
format
==
SampleFormat
::
DSD
;
const
bool
success
=
params
.
dop
#endif
const
bool
success
=
#ifdef ENABLE_DSD
params
.
dop
?
SetupDop
(
audio_format
,
params
,
error
)
:
alsa_setup
(
this
,
audio_format
,
params
,
error
);
:
#endif
alsa_setup
(
this
,
audio_format
,
params
,
error
);
if
(
!
success
)
return
false
;
...
...
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