Haiku: fix build

Convert the fill_buffer to a class method, to allow accessing the private method.

Also remove the leftover Wrapper stuff.
This commit is contained in:
François Revol 2018-01-05 23:07:18 +01:00
parent c74e018359
commit 5b18b66282

View File

@ -79,6 +79,8 @@ private:
std::chrono::steady_clock::duration Delay() const noexcept override; 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, void FillBuffer(void* _buffer, size_t size,
gcc_unused const media_raw_audio_format& _format); gcc_unused const media_raw_audio_format& _format);
@ -143,8 +145,8 @@ HaikuOutput::~HaikuOutput()
finalize_application(); finalize_application();
} }
static void void
fill_buffer(void* cookie, void* buffer, size_t size, HaikuOutput::_FillBuffer(void* cookie, void* buffer, size_t size,
const media_raw_audio_format& format) const media_raw_audio_format& format)
{ {
HaikuOutput *ad = (HaikuOutput *)cookie; HaikuOutput *ad = (HaikuOutput *)cookie;
@ -231,7 +233,7 @@ HaikuOutput::Open(AudioFormat &audio_format)
format.format, (int)format.buffer_size); format.format, (int)format.buffer_size);
sound_player = new BSoundPlayer(&format, "MPD Output", sound_player = new BSoundPlayer(&format, "MPD Output",
fill_buffer, NULL, this); HaikuOutput::_FillBuffer, NULL, this);
err = sound_player->InitCheck(); err = sound_player->InitCheck();
if (err != B_OK) { if (err != B_OK) {
@ -452,8 +454,6 @@ haiku_output_set_volume(HaikuOutput &haiku, unsigned volume)
return true; return true;
} }
typedef AudioOutputWrapper<HaikuOutput> Wrapper;
const struct AudioOutputPlugin haiku_output_plugin = { const struct AudioOutputPlugin haiku_output_plugin = {
"haiku", "haiku",
haiku_test_default_device, haiku_test_default_device,