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
b35bb1b5
Commit
b35bb1b5
authored
Nov 04, 2016
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/alsa: use C++ initializers
parent
6341be9c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
16 deletions
+13
-16
AlsaOutputPlugin.cxx
src/output/plugins/AlsaOutputPlugin.cxx
+13
-16
No files found.
src/output/plugins/AlsaOutputPlugin.cxx
View file @
b35bb1b5
...
...
@@ -59,7 +59,7 @@ struct AlsaOutput {
* The configured name of the ALSA device; empty for the
* default device
*/
std
::
string
device
;
const
std
::
string
device
;
#ifdef ENABLE_DSD
/**
...
...
@@ -67,14 +67,14 @@ struct AlsaOutput {
*
* @see http://dsd-guide.com/dop-open-standard
*/
bool
dop
;
const
bool
dop
;
#endif
/** libasound's buffer_time setting (in microseconds) */
unsigned
int
buffer_time
;
const
unsigned
buffer_time
;
/** libasound's period_time setting (in microseconds) */
unsigned
int
period_time
;
const
unsigned
period_time
;
/** the mode flags passed to snd_pcm_open */
int
mode
=
0
;
...
...
@@ -167,20 +167,17 @@ private:
static
constexpr
Domain
alsa_output_domain
(
"alsa_output"
);
AlsaOutput
::
AlsaOutput
(
const
ConfigBlock
&
block
)
:
base
(
alsa_output_plugin
,
block
)
{
device
=
block
.
GetBlockValue
(
"device"
,
""
);
:
base
(
alsa_output_plugin
,
block
),
device
(
block
.
GetBlockValue
(
"device"
,
""
)),
#ifdef ENABLE_DSD
dop
=
block
.
GetBlockValue
(
"dop"
,
false
)
||
/* legacy name from MPD 0.18 and older: */
block
.
GetBlockValue
(
"dsd_usb"
,
false
);
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
);
period_time
=
block
.
GetBlockValue
(
"period_time"
,
0u
);
buffer_time
(
block
.
GetBlockValue
(
"buffer_time"
,
MPD_ALSA_BUFFER_TIME_US
)),
period_time
(
block
.
GetBlockValue
(
"period_time"
,
0u
))
{
#ifdef SND_PCM_NO_AUTO_RESAMPLE
if
(
!
block
.
GetBlockValue
(
"auto_resample"
,
true
))
mode
|=
SND_PCM_NO_AUTO_RESAMPLE
;
...
...
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