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
f016eef4
Commit
f016eef4
authored
Jan 04, 2015
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/pulse: use AudioOutputWrapper::Init()
parent
f6495141
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
9 deletions
+7
-9
PulseOutputPlugin.cxx
src/output/plugins/PulseOutputPlugin.cxx
+7
-9
No files found.
src/output/plugins/PulseOutputPlugin.cxx
View file @
f016eef4
...
...
@@ -66,6 +66,7 @@ struct PulseOutput {
static
bool
TestDefaultDevice
();
bool
Configure
(
const
config_param
&
param
,
Error
&
error
);
static
PulseOutput
*
Create
(
const
config_param
&
param
,
Error
&
error
);
bool
Enable
(
Error
&
error
);
void
Disable
();
...
...
@@ -381,21 +382,19 @@ PulseOutput::Configure(const config_param ¶m, Error &error)
return
true
;
}
static
Audio
Output
*
pulse_output_init
(
const
config_param
&
param
,
Error
&
error
)
Pulse
Output
*
PulseOutput
::
Create
(
const
config_param
&
param
,
Error
&
error
)
{
PulseOutput
*
po
;
setenv
(
"PULSE_PROP_media.role"
,
"music"
,
true
);
setenv
(
"PULSE_PROP_application.icon_name"
,
"mpd"
,
true
);
po
=
new
PulseOutput
();
auto
*
po
=
new
PulseOutput
();
if
(
!
po
->
Configure
(
param
,
error
))
{
delete
po
;
return
nullptr
;
}
return
&
po
->
base
;
return
po
;
}
inline
bool
...
...
@@ -849,8 +848,7 @@ inline bool
PulseOutput
::
TestDefaultDevice
()
{
const
config_param
empty
;
PulseOutput
*
po
=
(
PulseOutput
*
)
pulse_output_init
(
empty
,
IgnoreError
());
PulseOutput
*
po
=
PulseOutput
::
Create
(
empty
,
IgnoreError
());
if
(
po
==
nullptr
)
return
false
;
...
...
@@ -870,7 +868,7 @@ typedef AudioOutputWrapper<PulseOutput> Wrapper;
const
struct
AudioOutputPlugin
pulse_output_plugin
=
{
"pulse"
,
pulse_output_test_default_device
,
pulse_output_i
nit
,
&
Wrapper
::
I
nit
,
&
Wrapper
::
Finish
,
&
Wrapper
::
Enable
,
&
Wrapper
::
Disable
,
...
...
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