output/Control: add method Configure()

Prepare to move some configuration settings from AudioOutput to
AudioOutputControl.
This commit is contained in:
Max Kellermann
2017-05-22 23:36:45 +02:00
parent e5847f1ddf
commit 2e65686fc0
3 changed files with 24 additions and 1 deletions

View File

@@ -75,7 +75,18 @@ LoadOutputControl(EventLoop &event_loop,
auto *output = LoadOutput(event_loop, replay_gain_config,
mixer_listener,
client, block);
return new AudioOutputControl(output);
auto *control = new AudioOutputControl(output);
try {
control->Configure(block);
} catch (...) {
control->BeginDestroy();
control->FinishDestroy();
delete control;
throw;
}
return control;
}
void