haiku: fix build

Some missing bits when converted to C++ exceptions...
This commit is contained in:
François Revol 2017-02-20 00:45:46 +01:00 committed by Max Kellermann
parent d0b4bd08e1
commit 46aa4d2f91
2 changed files with 11 additions and 10 deletions

View File

@ -25,6 +25,8 @@
#include "output/plugins/HaikuOutputPlugin.hxx" #include "output/plugins/HaikuOutputPlugin.hxx"
#include "Compiler.h" #include "Compiler.h"
#include "util/RuntimeError.hxx"
class HaikuMixer final : public Mixer { class HaikuMixer final : public Mixer {
/** the base mixer class */ /** the base mixer class */
HaikuOutput &self; HaikuOutput &self;
@ -35,36 +37,34 @@ public:
self(_output) {} self(_output) {}
/* virtual methods from class Mixer */ /* virtual methods from class Mixer */
virtual bool Open(gcc_unused Error &error) override { virtual void Open() override {
return true;
} }
virtual void Close() override { virtual void Close() override {
} }
virtual int GetVolume(Error &error) override; virtual int GetVolume() override;
virtual bool SetVolume(unsigned volume, Error &error) override; virtual void SetVolume(unsigned volume) override;
}; };
static Mixer * static Mixer *
haiku_mixer_init(gcc_unused EventLoop &event_loop, AudioOutput &ao, haiku_mixer_init(gcc_unused EventLoop &event_loop, AudioOutput &ao,
MixerListener &listener, MixerListener &listener,
gcc_unused const ConfigBlock &block, gcc_unused const ConfigBlock &block)
gcc_unused Error &error)
{ {
return new HaikuMixer((HaikuOutput &)ao, listener); return new HaikuMixer((HaikuOutput &)ao, listener);
} }
int int
HaikuMixer::GetVolume(gcc_unused Error &error) HaikuMixer::GetVolume()
{ {
return haiku_output_get_volume(self); return haiku_output_get_volume(self);
} }
bool void
HaikuMixer::SetVolume(unsigned volume, gcc_unused Error &error) HaikuMixer::SetVolume(unsigned volume)
{ {
return haiku_output_set_volume(self, volume); haiku_output_set_volume(self, volume);
} }
const MixerPlugin haiku_mixer_plugin = { const MixerPlugin haiku_mixer_plugin = {

View File

@ -24,6 +24,7 @@
#include "../Wrapper.hxx" #include "../Wrapper.hxx"
#include "mixer/MixerList.hxx" #include "mixer/MixerList.hxx"
#include "util/Domain.hxx" #include "util/Domain.hxx"
#include "system/Error.hxx"
#include "Log.hxx" #include "Log.hxx"
#include <AppFileInfo.h> #include <AppFileInfo.h>