summaryrefslogtreecommitdiff
path: root/src/output/plugins/OpenALOutputPlugin.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@musicpd.org>2016-11-09 11:56:01 +0100
committerMax Kellermann <max@musicpd.org>2016-11-09 12:36:21 +0100
commitd9cb85df8389c68ebe455e95413b45343394d6a5 (patch)
tree9da8711ab03a29b1b0b462e1cdd0da5765e00767 /src/output/plugins/OpenALOutputPlugin.cxx
parent445e82be759c28aae97594f447fba4007e26a4e3 (diff)
output/Plugin: remove 'Error&' parameters, use C++ exceptions only
Diffstat (limited to 'src/output/plugins/OpenALOutputPlugin.cxx')
-rw-r--r--src/output/plugins/OpenALOutputPlugin.cxx17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/output/plugins/OpenALOutputPlugin.cxx b/src/output/plugins/OpenALOutputPlugin.cxx
index d2d208e54..0db98a2cb 100644
--- a/src/output/plugins/OpenALOutputPlugin.cxx
+++ b/src/output/plugins/OpenALOutputPlugin.cxx
@@ -52,10 +52,9 @@ class OpenALOutput {
OpenALOutput(const ConfigBlock &block);
- static OpenALOutput *Create(const ConfigBlock &block, Error &error);
-
- bool Open(AudioFormat &audio_format, Error &error);
+ static OpenALOutput *Create(const ConfigBlock &block);
+ void Open(AudioFormat &audio_format);
void Close();
gcc_pure
@@ -68,7 +67,7 @@ class OpenALOutput {
: 50;
}
- size_t Play(const void *chunk, size_t size, Error &error);
+ size_t Play(const void *chunk, size_t size);
void Cancel();
@@ -147,13 +146,13 @@ OpenALOutput::OpenALOutput(const ConfigBlock &block)
}
inline OpenALOutput *
-OpenALOutput::Create(const ConfigBlock &block, Error &)
+OpenALOutput::Create(const ConfigBlock &block)
{
return new OpenALOutput(block);
}
-inline bool
-OpenALOutput::Open(AudioFormat &audio_format, Error &)
+inline void
+OpenALOutput::Open(AudioFormat &audio_format)
{
format = openal_audio_format(audio_format);
@@ -174,8 +173,6 @@ OpenALOutput::Open(AudioFormat &audio_format, Error &)
filled = 0;
frequency = audio_format.sample_rate;
-
- return true;
}
inline void
@@ -189,7 +186,7 @@ OpenALOutput::Close()
}
inline size_t
-OpenALOutput::Play(const void *chunk, size_t size, gcc_unused Error &error)
+OpenALOutput::Play(const void *chunk, size_t size)
{
if (alcGetCurrentContext() != context)
alcMakeContextCurrent(context);