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
3b6d4e66
Commit
3b6d4e66
authored
Aug 06, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mixer/alsa: move alsa_mixer_elem_callback() into the AlsaMixer class
parent
e8f328d8
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
3 deletions
+7
-3
AlsaMixerPlugin.cxx
src/mixer/plugins/AlsaMixerPlugin.cxx
+7
-3
No files found.
src/mixer/plugins/AlsaMixerPlugin.cxx
View file @
3b6d4e66
...
@@ -112,6 +112,10 @@ private:
...
@@ -112,6 +112,10 @@ private:
unsigned
GetPercentVolume
()
const
noexcept
{
unsigned
GetPercentVolume
()
const
noexcept
{
return
NormalizedToPercent
(
GetNormalizedVolume
());
return
NormalizedToPercent
(
GetNormalizedVolume
());
}
}
static
int
ElemCallback
(
snd_mixer_elem_t
*
elem
,
unsigned
mask
)
noexcept
;
};
};
static
constexpr
Domain
alsa_mixer_domain
(
"alsa_mixer"
);
static
constexpr
Domain
alsa_mixer_domain
(
"alsa_mixer"
);
...
@@ -155,8 +159,8 @@ AlsaMixerMonitor::DispatchSockets() noexcept
...
@@ -155,8 +159,8 @@ AlsaMixerMonitor::DispatchSockets() noexcept
*
*
*/
*/
static
int
int
alsa_mixer_elem_callback
(
snd_mixer_elem_t
*
elem
,
unsigned
mask
)
AlsaMixer
::
ElemCallback
(
snd_mixer_elem_t
*
elem
,
unsigned
mask
)
noexcept
{
{
AlsaMixer
&
mixer
=
*
(
AlsaMixer
*
)
AlsaMixer
&
mixer
=
*
(
AlsaMixer
*
)
snd_mixer_elem_get_callback_private
(
elem
);
snd_mixer_elem_get_callback_private
(
elem
);
...
@@ -244,7 +248,7 @@ AlsaMixer::Setup()
...
@@ -244,7 +248,7 @@ AlsaMixer::Setup()
throw
FormatRuntimeError
(
"no such mixer control: %s"
,
control
);
throw
FormatRuntimeError
(
"no such mixer control: %s"
,
control
);
snd_mixer_elem_set_callback_private
(
elem
,
this
);
snd_mixer_elem_set_callback_private
(
elem
,
this
);
snd_mixer_elem_set_callback
(
elem
,
alsa_mixer_elem_c
allback
);
snd_mixer_elem_set_callback
(
elem
,
ElemC
allback
);
monitor
=
new
AlsaMixerMonitor
(
event_loop
,
handle
);
monitor
=
new
AlsaMixerMonitor
(
event_loop
,
handle
);
}
}
...
...
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