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
c04aafb4
Commit
c04aafb4
authored
Dec 29, 2017
by
Max Kellermann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
output/Multiple: add "noexcept"
parent
e31abe6d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
28 additions
and
28 deletions
+28
-28
MultipleOutputs.cxx
src/output/MultipleOutputs.cxx
+13
-13
MultipleOutputs.hxx
src/output/MultipleOutputs.hxx
+15
-15
No files found.
src/output/MultipleOutputs.cxx
View file @
c04aafb4
...
...
@@ -35,12 +35,12 @@
#include <assert.h>
#include <string.h>
MultipleOutputs
::
MultipleOutputs
(
MixerListener
&
_mixer_listener
)
MultipleOutputs
::
MultipleOutputs
(
MixerListener
&
_mixer_listener
)
noexcept
:
mixer_listener
(
_mixer_listener
)
{
}
MultipleOutputs
::~
MultipleOutputs
()
MultipleOutputs
::~
MultipleOutputs
()
noexcept
{
/* parallel destruction */
for
(
auto
*
i
:
outputs
)
...
...
@@ -177,14 +177,14 @@ MultipleOutputs::WaitAll() noexcept
}
void
MultipleOutputs
::
AllowPlay
()
MultipleOutputs
::
AllowPlay
()
noexcept
{
for
(
auto
*
ao
:
outputs
)
ao
->
LockAllowPlay
();
}
bool
MultipleOutputs
::
Update
(
bool
force
)
MultipleOutputs
::
Update
(
bool
force
)
noexcept
{
bool
ret
=
false
;
...
...
@@ -199,7 +199,7 @@ MultipleOutputs::Update(bool force)
}
void
MultipleOutputs
::
SetReplayGainMode
(
ReplayGainMode
mode
)
MultipleOutputs
::
SetReplayGainMode
(
ReplayGainMode
mode
)
noexcept
{
for
(
auto
*
ao
:
outputs
)
ao
->
SetReplayGainMode
(
mode
);
...
...
@@ -292,7 +292,7 @@ MultipleOutputs::IsChunkConsumed(const MusicChunk *chunk) const noexcept
inline
void
MultipleOutputs
::
ClearTailChunk
(
const
MusicChunk
*
chunk
,
bool
*
locked
)
bool
*
locked
)
noexcept
{
assert
(
chunk
->
next
==
nullptr
);
assert
(
pipe
->
Contains
(
chunk
));
...
...
@@ -315,7 +315,7 @@ MultipleOutputs::ClearTailChunk(const MusicChunk *chunk,
}
unsigned
MultipleOutputs
::
Check
()
MultipleOutputs
::
Check
()
noexcept
{
const
MusicChunk
*
chunk
;
bool
is_tail
;
...
...
@@ -363,7 +363,7 @@ MultipleOutputs::Check()
}
void
MultipleOutputs
::
Pause
()
MultipleOutputs
::
Pause
()
noexcept
{
Update
(
false
);
...
...
@@ -374,7 +374,7 @@ MultipleOutputs::Pause()
}
void
MultipleOutputs
::
Drain
()
MultipleOutputs
::
Drain
()
noexcept
{
for
(
auto
*
ao
:
outputs
)
ao
->
LockDrainAsync
();
...
...
@@ -383,7 +383,7 @@ MultipleOutputs::Drain()
}
void
MultipleOutputs
::
Cancel
()
MultipleOutputs
::
Cancel
()
noexcept
{
/* send the cancel() command to all audio outputs */
...
...
@@ -408,7 +408,7 @@ MultipleOutputs::Cancel()
}
void
MultipleOutputs
::
Close
()
MultipleOutputs
::
Close
()
noexcept
{
for
(
auto
*
ao
:
outputs
)
ao
->
LockCloseWait
();
...
...
@@ -429,7 +429,7 @@ MultipleOutputs::Close()
}
void
MultipleOutputs
::
Release
()
MultipleOutputs
::
Release
()
noexcept
{
for
(
auto
*
ao
:
outputs
)
ao
->
LockRelease
();
...
...
@@ -450,7 +450,7 @@ MultipleOutputs::Release()
}
void
MultipleOutputs
::
SongBorder
()
MultipleOutputs
::
SongBorder
()
noexcept
{
/* clear the elapsed_time pointer at the beginning of a new
song */
...
...
src/output/MultipleOutputs.hxx
View file @
c04aafb4
...
...
@@ -73,8 +73,8 @@ public:
* Load audio outputs from the configuration file and
* initialize them.
*/
MultipleOutputs
(
MixerListener
&
_mixer_listener
);
~
MultipleOutputs
();
MultipleOutputs
(
MixerListener
&
_mixer_listener
)
noexcept
;
~
MultipleOutputs
()
noexcept
;
void
Configure
(
EventLoop
&
event_loop
,
const
ReplayGainConfig
&
replay_gain_config
,
...
...
@@ -96,13 +96,13 @@ public:
/**
* Returns the "i"th audio output device.
*/
const
AudioOutputControl
&
Get
(
unsigned
i
)
const
{
const
AudioOutputControl
&
Get
(
unsigned
i
)
const
noexcept
{
assert
(
i
<
Size
());
return
*
outputs
[
i
];
}
AudioOutputControl
&
Get
(
unsigned
i
)
{
AudioOutputControl
&
Get
(
unsigned
i
)
noexcept
{
assert
(
i
<
Size
());
return
*
outputs
[
i
];
...
...
@@ -135,15 +135,15 @@ public:
/**
* Closes all audio outputs.
*/
void
Close
();
void
Close
()
noexcept
;
/**
* Closes all audio outputs. Outputs with the "always_on"
* flag are put into pause mode.
*/
void
Release
();
void
Release
()
noexcept
;
void
SetReplayGainMode
(
ReplayGainMode
mode
);
void
SetReplayGainMode
(
ReplayGainMode
mode
)
noexcept
;
/**
* Enqueue a #MusicChunk object for playing, i.e. pushes it to a
...
...
@@ -161,28 +161,28 @@ public:
*
* @return the number of chunks to play left in the #MusicPipe
*/
unsigned
Check
();
unsigned
Check
()
noexcept
;
/**
* Puts all audio outputs into pause mode. Most implementations will
* simply close it then.
*/
void
Pause
();
void
Pause
()
noexcept
;
/**
* Drain all audio outputs.
*/
void
Drain
();
void
Drain
()
noexcept
;
/**
* Try to cancel data which may still be in the device's buffers.
*/
void
Cancel
();
void
Cancel
()
noexcept
;
/**
* Indicate that a new song will begin now.
*/
void
SongBorder
();
void
SongBorder
()
noexcept
;
/**
* Returns the "elapsed_time" stamp of the most recently finished
...
...
@@ -238,7 +238,7 @@ private:
/**
* Signals all audio outputs which are open.
*/
void
AllowPlay
();
void
AllowPlay
()
noexcept
;
/**
* Opens all output devices which are enabled, but closed.
...
...
@@ -246,7 +246,7 @@ private:
* @return true if there is at least open output device which
* is open
*/
bool
Update
(
bool
force
);
bool
Update
(
bool
force
)
noexcept
;
/**
* Has this chunk been consumed by all audio outputs?
...
...
@@ -258,7 +258,7 @@ private:
* audio outputs have consumed it already. Clear the
* reference.
*/
void
ClearTailChunk
(
const
MusicChunk
*
chunk
,
bool
*
locked
);
void
ClearTailChunk
(
const
MusicChunk
*
chunk
,
bool
*
locked
)
noexcept
;
};
#endif
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