Commit bbe7a373 authored by Max Kellermann's avatar Max Kellermann

output/Internal: hide Configure() and remove the non-configuring constructor

parent d0aa154e
......@@ -49,19 +49,15 @@
#define AUDIO_OUTPUT_FORMAT "format"
#define AUDIO_FILTERS "filters"
AudioOutput::AudioOutput(const AudioOutputPlugin &_plugin)
AudioOutput::AudioOutput(const AudioOutputPlugin &_plugin,
const ConfigBlock &block)
:plugin(_plugin)
{
assert(plugin.finish != nullptr);
assert(plugin.open != nullptr);
assert(plugin.close != nullptr);
assert(plugin.play != nullptr);
}
AudioOutput::AudioOutput(const AudioOutputPlugin &_plugin,
const ConfigBlock &block)
:AudioOutput(_plugin)
{
Error error;
if (!Configure(block, error))
throw std::runtime_error(error.GetMessage());
......
......@@ -282,8 +282,6 @@ struct AudioOutput {
*/
bool current_chunk_finished;
AudioOutput(const AudioOutputPlugin &_plugin);
/**
* Throws #std::runtime_error on error.
*/
......@@ -292,8 +290,10 @@ struct AudioOutput {
~AudioOutput();
private:
bool Configure(const ConfigBlock &block, Error &error);
public:
void StartThread();
void StopThread();
......
......@@ -60,10 +60,6 @@ struct SolarisOutput {
explicit SolarisOutput(const ConfigBlock &block)
:base(solaris_output_plugin, block),
device(block.GetBlockValue("device", "/dev/audio")) {}
bool Initialize(const ConfigBlock &block, Error &error_r) {
return base.Configure(block, error_r);
}
};
static bool
......
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