1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-22 13:23:55 +00:00

Move Sound_Output's definition to a separate header

This commit is contained in:
Chris Robinson 2012-03-16 23:40:07 -07:00
parent 10037e79e7
commit 1322b1e160
5 changed files with 35 additions and 16 deletions

View file

@ -1,3 +1,6 @@
#include <stdexcept>
#include <iostream>
#include "openal_output.hpp"
namespace MWSound

View file

@ -1,13 +1,17 @@
#ifndef GAME_SOUND_OPENAL_OUTPUT_H
#define GAME_SOUND_OPENAL_OUTPUT_H
#include "soundmanager.hpp"
#include <string>
#include "alc.h"
#include "al.h"
#include "sound_output.hpp"
namespace MWSound
{
class SoundManager;
class OpenAL_Output : public Sound_Output
{
ALCdevice *Device;

View file

@ -0,0 +1,26 @@
#ifndef GAME_SOUND_SOUND_OUTPUT_H
#define GAME_SOUND_SOUND_OUTPUT_H
#include <string>
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

View file

@ -12,6 +12,7 @@
#include "../mwworld/world.hpp"
#include "../mwworld/player.hpp"
#include "sound_output.hpp"
#include "sound_decoder.hpp"
#include "openal_output.hpp"

View file

@ -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