2012-03-17 06:40:07 +00:00
|
|
|
#ifndef GAME_SOUND_SOUND_OUTPUT_H
|
|
|
|
#define GAME_SOUND_SOUND_OUTPUT_H
|
|
|
|
|
|
|
|
#include <string>
|
2012-03-17 09:55:08 +00:00
|
|
|
#include <memory>
|
2012-03-17 06:40:07 +00:00
|
|
|
|
2012-03-17 13:51:44 +00:00
|
|
|
#include "../mwworld/ptr.hpp"
|
|
|
|
|
2012-03-17 06:40:07 +00:00
|
|
|
namespace MWSound
|
|
|
|
{
|
|
|
|
class SoundManager;
|
2012-03-17 09:55:08 +00:00
|
|
|
class Sound_Decoder;
|
|
|
|
class Sound;
|
2012-03-17 06:40:07 +00:00
|
|
|
|
|
|
|
class Sound_Output
|
|
|
|
{
|
|
|
|
SoundManager &mgr;
|
|
|
|
|
|
|
|
virtual bool Initialize(const std::string &devname="") = 0;
|
|
|
|
virtual void Deinitialize() = 0;
|
|
|
|
|
2012-03-17 13:51:44 +00:00
|
|
|
virtual Sound *PlaySound(const std::string &fname, std::auto_ptr<Sound_Decoder> decoder,
|
|
|
|
float volume, float pitch, bool loop) = 0;
|
|
|
|
virtual Sound *PlaySound3D(const std::string &fname, std::auto_ptr<Sound_Decoder> decoder,
|
|
|
|
MWWorld::Ptr ptr, float volume, float pitch,
|
|
|
|
float min, float max, bool loop) = 0;
|
2012-03-17 16:37:41 +00:00
|
|
|
virtual Sound *StreamSound(const std::string &fname, std::auto_ptr<Sound_Decoder> decoder,
|
|
|
|
float volume, float pitch) = 0;
|
2012-03-17 09:55:08 +00:00
|
|
|
|
2012-03-17 11:22:54 +00:00
|
|
|
// FIXME: This should take an MWWorld::Ptr that represents the in-world camera
|
|
|
|
virtual void UpdateListener(float pos[3], float atdir[3], float updir[3]) = 0;
|
|
|
|
|
2012-03-17 06:40:07 +00:00
|
|
|
Sound_Output(SoundManager &mgr) : mgr(mgr) { }
|
|
|
|
public:
|
|
|
|
virtual ~Sound_Output() { }
|
|
|
|
|
|
|
|
friend class OpenAL_Output;
|
|
|
|
friend class SoundManager;
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif
|