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
4f7f577a
Commit
4f7f577a
authored
Aug 07, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/Internal: add OpenSoftwareMixer()
Moved code from AudioOutputControl::InternalOpen2().
parent
612def5c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
5 deletions
+13
-5
Internal.cxx
src/output/Internal.cxx
+7
-0
Internal.hxx
src/output/Internal.hxx
+5
-0
Thread.cxx
src/output/Thread.cxx
+1
-5
No files found.
src/output/Internal.cxx
View file @
4f7f577a
...
@@ -99,6 +99,13 @@ AudioOutput::CloseOutput(bool drain) noexcept
...
@@ -99,6 +99,13 @@ AudioOutput::CloseOutput(bool drain) noexcept
}
}
void
void
AudioOutput
::
OpenSoftwareMixer
()
noexcept
{
if
(
mixer
!=
nullptr
&&
mixer
->
IsPlugin
(
software_mixer_plugin
))
software_mixer_set_filter
(
*
mixer
,
volume_filter
.
Get
());
}
void
AudioOutput
::
CloseSoftwareMixer
()
noexcept
AudioOutput
::
CloseSoftwareMixer
()
noexcept
{
{
if
(
mixer
!=
nullptr
&&
mixer
->
IsPlugin
(
software_mixer_plugin
))
if
(
mixer
!=
nullptr
&&
mixer
->
IsPlugin
(
software_mixer_plugin
))
...
...
src/output/Internal.hxx
View file @
4f7f577a
...
@@ -163,6 +163,11 @@ public:
...
@@ -163,6 +163,11 @@ public:
/**
/**
* Mutex must not be locked.
* Mutex must not be locked.
*/
*/
void
OpenSoftwareMixer
()
noexcept
;
/**
* Mutex must not be locked.
*/
void
CloseSoftwareMixer
()
noexcept
;
void
CloseSoftwareMixer
()
noexcept
;
void
BeginPause
()
noexcept
;
void
BeginPause
()
noexcept
;
...
...
src/output/Thread.cxx
View file @
4f7f577a
...
@@ -26,7 +26,6 @@
...
@@ -26,7 +26,6 @@
#include "notify.hxx"
#include "notify.hxx"
#include "filter/plugins/ConvertFilterPlugin.hxx"
#include "filter/plugins/ConvertFilterPlugin.hxx"
#include "mixer/MixerInternal.hxx"
#include "mixer/MixerInternal.hxx"
#include "mixer/plugins/SoftwareMixerPlugin.hxx"
#include "thread/Util.hxx"
#include "thread/Util.hxx"
#include "thread/Slack.hxx"
#include "thread/Slack.hxx"
#include "thread/Name.hxx"
#include "thread/Name.hxx"
...
@@ -53,10 +52,7 @@ AudioOutputControl::InternalOpen2(const AudioFormat in_audio_format)
...
@@ -53,10 +52,7 @@ AudioOutputControl::InternalOpen2(const AudioFormat in_audio_format)
{
{
assert
(
in_audio_format
.
IsValid
());
assert
(
in_audio_format
.
IsValid
());
if
(
output
->
mixer
!=
nullptr
&&
output
->
OpenSoftwareMixer
();
output
->
mixer
->
IsPlugin
(
software_mixer_plugin
))
software_mixer_set_filter
(
*
output
->
mixer
,
output
->
volume_filter
.
Get
());
const
auto
cf
=
in_audio_format
.
WithMask
(
output
->
config_audio_format
);
const
auto
cf
=
in_audio_format
.
WithMask
(
output
->
config_audio_format
);
...
...
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