output/haiku: eliminate DoClose()

This commit is contained in:
Max Kellermann 2016-11-09 11:42:00 +01:00
parent fa90047e52
commit 0cf85b0771

View File

@ -74,10 +74,7 @@ public:
static HaikuOutput *Create(const ConfigBlock &block, Error &error); static HaikuOutput *Create(const ConfigBlock &block, Error &error);
bool Open(AudioFormat &audio_format, Error &error); bool Open(AudioFormat &audio_format, Error &error);
void Close();
void Close() {
DoClose();
}
size_t Play(const void *chunk, size_t size, Error &error); size_t Play(const void *chunk, size_t size, Error &error);
void Cancel(); void Cancel();
@ -88,10 +85,6 @@ public:
gcc_unused const media_raw_audio_format& _format); gcc_unused const media_raw_audio_format& _format);
void SendTag(const Tag &tag); void SendTag(const Tag &tag);
private:
void DoClose();
}; };
static constexpr Domain haiku_output_domain("haiku_output"); static constexpr Domain haiku_output_domain("haiku_output");
@ -134,7 +127,7 @@ HaikuOutput::Create(const ConfigBlock &block, Error &)
} }
void void
HaikuOutput::DoClose() HaikuOutput::Close()
{ {
sound_player->SetHasData(false); sound_player->SetHasData(false);
delete_sem(new_buffer); delete_sem(new_buffer);