1
0
mirror of https://gitlab.com/OpenMW/openmw.git synced 2025-01-10 06:39:49 +00:00
OpenMW/apps/openmw/mwsound/openal_output.hpp

47 lines
1.2 KiB
C++
Raw Normal View History

#ifndef GAME_SOUND_OPENAL_OUTPUT_H
#define GAME_SOUND_OPENAL_OUTPUT_H
#include <string>
#include "alc.h"
#include "al.h"
#include "sound_output.hpp"
namespace MWSound
{
class SoundManager;
2012-03-17 09:55:08 +00:00
class Sound;
class OpenAL_Output : public Sound_Output
{
ALCdevice *mDevice;
ALCcontext *mContext;
2012-03-18 19:19:54 +00:00
virtual void init(const std::string &devname="");
virtual void deinit();
virtual Sound *playSound(const std::string &fname, float volume, float pitch, bool loop);
virtual Sound *playSound3D(const std::string &fname, const float *pos, float volume, float pitch,
2012-03-17 13:51:44 +00:00
float min, float max, bool loop);
virtual Sound *streamSound(const std::string &fname, float volume, float pitch);
2012-03-17 09:55:08 +00:00
virtual void updateListener(const float *pos, const float *atdir, const float *updir);
OpenAL_Output(SoundManager &mgr);
virtual ~OpenAL_Output();
class StreamThread;
std::auto_ptr<StreamThread> mStreamThread;
friend class OpenAL_SoundStream;
friend class SoundManager;
};
#ifndef DEFAULT_OUTPUT
#define DEFAULT_OUTPUT OpenAL_Output
#endif
};
#endif