From 5b18b662820cca9bc6c0bc1f39327c4a50f0e3f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Revol?= Date: Fri, 5 Jan 2018 23:07:18 +0100 Subject: [PATCH] Haiku: fix build Convert the fill_buffer to a class method, to allow accessing the private method. Also remove the leftover Wrapper stuff. --- src/output/plugins/HaikuOutputPlugin.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/output/plugins/HaikuOutputPlugin.cxx b/src/output/plugins/HaikuOutputPlugin.cxx index 2a604b9a1..578d701f6 100644 --- a/src/output/plugins/HaikuOutputPlugin.cxx +++ b/src/output/plugins/HaikuOutputPlugin.cxx @@ -79,6 +79,8 @@ private: std::chrono::steady_clock::duration Delay() const noexcept override; + static void _FillBuffer(void* cookie, void* _buffer, size_t size, + gcc_unused const media_raw_audio_format& _format); void FillBuffer(void* _buffer, size_t size, gcc_unused const media_raw_audio_format& _format); @@ -143,8 +145,8 @@ HaikuOutput::~HaikuOutput() finalize_application(); } -static void -fill_buffer(void* cookie, void* buffer, size_t size, +void +HaikuOutput::_FillBuffer(void* cookie, void* buffer, size_t size, const media_raw_audio_format& format) { HaikuOutput *ad = (HaikuOutput *)cookie; @@ -231,7 +233,7 @@ HaikuOutput::Open(AudioFormat &audio_format) format.format, (int)format.buffer_size); sound_player = new BSoundPlayer(&format, "MPD Output", - fill_buffer, NULL, this); + HaikuOutput::_FillBuffer, NULL, this); err = sound_player->InitCheck(); if (err != B_OK) { @@ -452,8 +454,6 @@ haiku_output_set_volume(HaikuOutput &haiku, unsigned volume) return true; } -typedef AudioOutputWrapper Wrapper; - const struct AudioOutputPlugin haiku_output_plugin = { "haiku", haiku_test_default_device,