From 1322b1e160e2c6a3109b1d623d8ccc87443d8d5c Mon Sep 17 00:00:00 2001 From: Chris Robinson Date: Fri, 16 Mar 2012 23:40:07 -0700 Subject: [PATCH] Move Sound_Output's definition to a separate header --- apps/openmw/mwsound/openal_output.cpp | 3 +++ apps/openmw/mwsound/openal_output.hpp | 6 +++++- apps/openmw/mwsound/sound_output.hpp | 26 ++++++++++++++++++++++++++ apps/openmw/mwsound/soundmanager.cpp | 1 + apps/openmw/mwsound/soundmanager.hpp | 15 --------------- 5 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 apps/openmw/mwsound/sound_output.hpp diff --git a/apps/openmw/mwsound/openal_output.cpp b/apps/openmw/mwsound/openal_output.cpp index 59e9037c4e..3f99100383 100644 --- a/apps/openmw/mwsound/openal_output.cpp +++ b/apps/openmw/mwsound/openal_output.cpp @@ -1,3 +1,6 @@ +#include +#include + #include "openal_output.hpp" namespace MWSound diff --git a/apps/openmw/mwsound/openal_output.hpp b/apps/openmw/mwsound/openal_output.hpp index 6d0169366c..d5748ee30c 100644 --- a/apps/openmw/mwsound/openal_output.hpp +++ b/apps/openmw/mwsound/openal_output.hpp @@ -1,13 +1,17 @@ #ifndef GAME_SOUND_OPENAL_OUTPUT_H #define GAME_SOUND_OPENAL_OUTPUT_H -#include "soundmanager.hpp" +#include #include "alc.h" #include "al.h" +#include "sound_output.hpp" + namespace MWSound { + class SoundManager; + class OpenAL_Output : public Sound_Output { ALCdevice *Device; diff --git a/apps/openmw/mwsound/sound_output.hpp b/apps/openmw/mwsound/sound_output.hpp new file mode 100644 index 0000000000..b36a4e89fc --- /dev/null +++ b/apps/openmw/mwsound/sound_output.hpp @@ -0,0 +1,26 @@ +#ifndef GAME_SOUND_SOUND_OUTPUT_H +#define GAME_SOUND_SOUND_OUTPUT_H + +#include + +namespace MWSound +{ + class SoundManager; + + class Sound_Output + { + SoundManager &mgr; + + virtual bool Initialize(const std::string &devname="") = 0; + virtual void Deinitialize() = 0; + + Sound_Output(SoundManager &mgr) : mgr(mgr) { } + public: + virtual ~Sound_Output() { } + + friend class OpenAL_Output; + friend class SoundManager; + }; +} + +#endif diff --git a/apps/openmw/mwsound/soundmanager.cpp b/apps/openmw/mwsound/soundmanager.cpp index c22550a2a1..cb9c58715e 100644 --- a/apps/openmw/mwsound/soundmanager.cpp +++ b/apps/openmw/mwsound/soundmanager.cpp @@ -12,6 +12,7 @@ #include "../mwworld/world.hpp" #include "../mwworld/player.hpp" +#include "sound_output.hpp" #include "sound_decoder.hpp" #include "openal_output.hpp" diff --git a/apps/openmw/mwsound/soundmanager.hpp b/apps/openmw/mwsound/soundmanager.hpp index 8d2184c54d..5a58c60b77 100644 --- a/apps/openmw/mwsound/soundmanager.hpp +++ b/apps/openmw/mwsound/soundmanager.hpp @@ -123,21 +123,6 @@ namespace MWSound void update(float duration); }; - - class Sound_Output - { - SoundManager &mgr; - - virtual bool Initialize(const std::string &devname="") = 0; - virtual void Deinitialize() = 0; - - Sound_Output(SoundManager &mgr) : mgr(mgr) { } - public: - virtual ~Sound_Output() { } - - friend class OpenAL_Output; - friend class SoundManager; - }; } #endif