Commit c04aafb4 authored by Max Kellermann's avatar Max Kellermann

output/Multiple: add "noexcept"

parent e31abe6d
......@@ -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 */
......
......@@ -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
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment