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
aa9933c0
Commit
aa9933c0
authored
Oct 19, 2021
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/pipewire: add `noexcept`
parent
0697d1f8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
13 deletions
+13
-13
PipeWireMixerPlugin.cxx
src/mixer/plugins/PipeWireMixerPlugin.cxx
+2
-2
PipeWireOutputPlugin.cxx
src/output/plugins/PipeWireOutputPlugin.cxx
+9
-9
PipeWireOutputPlugin.hxx
src/output/plugins/PipeWireOutputPlugin.hxx
+2
-2
No files found.
src/mixer/plugins/PipeWireMixerPlugin.cxx
View file @
aa9933c0
...
@@ -37,7 +37,7 @@ public:
...
@@ -37,7 +37,7 @@ public:
{
{
}
}
~
PipeWireMixer
()
override
;
~
PipeWireMixer
()
noexcept
override
;
PipeWireMixer
(
const
PipeWireMixer
&
)
=
delete
;
PipeWireMixer
(
const
PipeWireMixer
&
)
=
delete
;
PipeWireMixer
&
operator
=
(
const
PipeWireMixer
&
)
=
delete
;
PipeWireMixer
&
operator
=
(
const
PipeWireMixer
&
)
=
delete
;
...
@@ -89,7 +89,7 @@ pipewire_mixer_init([[maybe_unused]] EventLoop &event_loop, AudioOutput &ao,
...
@@ -89,7 +89,7 @@ pipewire_mixer_init([[maybe_unused]] EventLoop &event_loop, AudioOutput &ao,
return
pm
;
return
pm
;
}
}
PipeWireMixer
::~
PipeWireMixer
()
PipeWireMixer
::~
PipeWireMixer
()
noexcept
{
{
pipewire_output_clear_mixer
(
output
,
*
this
);
pipewire_output_clear_mixer
(
output
,
*
this
);
}
}
...
...
src/output/plugins/PipeWireOutputPlugin.cxx
View file @
aa9933c0
...
@@ -136,9 +136,9 @@ public:
...
@@ -136,9 +136,9 @@ public:
void
SetVolume
(
float
volume
);
void
SetVolume
(
float
volume
);
void
SetMixer
(
PipeWireMixer
&
_mixer
);
void
SetMixer
(
PipeWireMixer
&
_mixer
)
noexcept
;
void
ClearMixer
([[
maybe_unused
]]
PipeWireMixer
&
old_mixer
)
{
void
ClearMixer
([[
maybe_unused
]]
PipeWireMixer
&
old_mixer
)
noexcept
{
assert
(
mixer
==
&
old_mixer
);
assert
(
mixer
==
&
old_mixer
);
mixer
=
nullptr
;
mixer
=
nullptr
;
...
@@ -178,7 +178,7 @@ private:
...
@@ -178,7 +178,7 @@ private:
o
.
Drained
();
o
.
Drained
();
}
}
void
ControlInfo
(
const
struct
pw_stream_control
*
control
)
{
void
ControlInfo
(
const
struct
pw_stream_control
*
control
)
noexcept
{
float
sum
=
0
;
float
sum
=
0
;
unsigned
c
;
unsigned
c
;
for
(
c
=
0
;
c
<
control
->
n_values
;
c
++
)
for
(
c
=
0
;
c
<
control
->
n_values
;
c
++
)
...
@@ -200,7 +200,7 @@ private:
...
@@ -200,7 +200,7 @@ private:
o
.
ControlInfo
(
control
);
o
.
ControlInfo
(
control
);
}
}
void
ParamChanged
()
{
void
ParamChanged
()
noexcept
{
if
(
restore_volume
)
{
if
(
restore_volume
)
{
SetVolume
(
volume
);
SetVolume
(
volume
);
restore_volume
=
false
;
restore_volume
=
false
;
...
@@ -208,8 +208,8 @@ private:
...
@@ -208,8 +208,8 @@ private:
}
}
static
void
ParamChanged
(
void
*
data
,
static
void
ParamChanged
(
void
*
data
,
uint32_t
id
,
uint32_t
id
,
const
struct
spa_pod
*
param
)
const
struct
spa_pod
*
param
)
noexcept
{
{
if
(
id
!=
SPA_PARAM_Format
||
param
==
NULL
)
if
(
id
!=
SPA_PARAM_Format
||
param
==
NULL
)
return
;
return
;
...
@@ -643,7 +643,7 @@ PipeWireOutput::Pause() noexcept
...
@@ -643,7 +643,7 @@ PipeWireOutput::Pause() noexcept
}
}
inline
void
inline
void
PipeWireOutput
::
SetMixer
(
PipeWireMixer
&
_mixer
)
PipeWireOutput
::
SetMixer
(
PipeWireMixer
&
_mixer
)
noexcept
{
{
assert
(
mixer
==
nullptr
);
assert
(
mixer
==
nullptr
);
...
@@ -653,13 +653,13 @@ PipeWireOutput::SetMixer(PipeWireMixer &_mixer)
...
@@ -653,13 +653,13 @@ PipeWireOutput::SetMixer(PipeWireMixer &_mixer)
}
}
void
void
pipewire_output_set_mixer
(
PipeWireOutput
&
po
,
PipeWireMixer
&
pm
)
pipewire_output_set_mixer
(
PipeWireOutput
&
po
,
PipeWireMixer
&
pm
)
noexcept
{
{
po
.
SetMixer
(
pm
);
po
.
SetMixer
(
pm
);
}
}
void
void
pipewire_output_clear_mixer
(
PipeWireOutput
&
po
,
PipeWireMixer
&
pm
)
pipewire_output_clear_mixer
(
PipeWireOutput
&
po
,
PipeWireMixer
&
pm
)
noexcept
{
{
po
.
ClearMixer
(
pm
);
po
.
ClearMixer
(
pm
);
}
}
...
...
src/output/plugins/PipeWireOutputPlugin.hxx
View file @
aa9933c0
...
@@ -26,10 +26,10 @@ class PipeWireMixer;
...
@@ -26,10 +26,10 @@ class PipeWireMixer;
extern
const
struct
AudioOutputPlugin
pipewire_output_plugin
;
extern
const
struct
AudioOutputPlugin
pipewire_output_plugin
;
void
void
pipewire_output_set_mixer
(
PipeWireOutput
&
po
,
PipeWireMixer
&
pm
);
pipewire_output_set_mixer
(
PipeWireOutput
&
po
,
PipeWireMixer
&
pm
)
noexcept
;
void
void
pipewire_output_clear_mixer
(
PipeWireOutput
&
po
,
PipeWireMixer
&
pm
);
pipewire_output_clear_mixer
(
PipeWireOutput
&
po
,
PipeWireMixer
&
pm
)
noexcept
;
void
void
pipewire_output_set_volume
(
PipeWireOutput
&
output
,
float
volume
);
pipewire_output_set_volume
(
PipeWireOutput
&
output
,
float
volume
);
...
...
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