mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-03-26 11:37:12 +00:00
Move Sound_Output's definition to a separate header
This commit is contained in:
parent
10037e79e7
commit
1322b1e160
@ -1,3 +1,6 @@
|
|||||||
|
#include <stdexcept>
|
||||||
|
#include <iostream>
|
||||||
|
|
||||||
#include "openal_output.hpp"
|
#include "openal_output.hpp"
|
||||||
|
|
||||||
namespace MWSound
|
namespace MWSound
|
||||||
|
@ -1,13 +1,17 @@
|
|||||||
#ifndef GAME_SOUND_OPENAL_OUTPUT_H
|
#ifndef GAME_SOUND_OPENAL_OUTPUT_H
|
||||||
#define GAME_SOUND_OPENAL_OUTPUT_H
|
#define GAME_SOUND_OPENAL_OUTPUT_H
|
||||||
|
|
||||||
#include "soundmanager.hpp"
|
#include <string>
|
||||||
|
|
||||||
#include "alc.h"
|
#include "alc.h"
|
||||||
#include "al.h"
|
#include "al.h"
|
||||||
|
|
||||||
|
#include "sound_output.hpp"
|
||||||
|
|
||||||
namespace MWSound
|
namespace MWSound
|
||||||
{
|
{
|
||||||
|
class SoundManager;
|
||||||
|
|
||||||
class OpenAL_Output : public Sound_Output
|
class OpenAL_Output : public Sound_Output
|
||||||
{
|
{
|
||||||
ALCdevice *Device;
|
ALCdevice *Device;
|
||||||
|
26
apps/openmw/mwsound/sound_output.hpp
Normal file
26
apps/openmw/mwsound/sound_output.hpp
Normal 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
|
@ -12,6 +12,7 @@
|
|||||||
#include "../mwworld/world.hpp"
|
#include "../mwworld/world.hpp"
|
||||||
#include "../mwworld/player.hpp"
|
#include "../mwworld/player.hpp"
|
||||||
|
|
||||||
|
#include "sound_output.hpp"
|
||||||
#include "sound_decoder.hpp"
|
#include "sound_decoder.hpp"
|
||||||
|
|
||||||
#include "openal_output.hpp"
|
#include "openal_output.hpp"
|
||||||
|
@ -123,21 +123,6 @@ namespace MWSound
|
|||||||
|
|
||||||
void update(float duration);
|
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
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user