1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-01-23 20:53:54 +00:00
openmw/sound/servers/audiere_imp.h
Nicolay Korslund 69e8f9c9db Renamed several dirs, files and classes. NOT TESTED.
- renamed imp_client/ to clients/ and ditto for servers/
- renamed imp/ to servers/
- renamed stream/input.h to stream/stream.h
- renamed Stream::InputStream to Stream::Stream
- updated various tests and makefiles
- NOT TESTED YET
2009-12-28 15:55:04 +01:00

77 lines
1.7 KiB
C++

#ifndef MANGLE_SOUND_AUDIERE_H
#define MANGLE_SOUND_AUDIERE_H
#include "../sound.h"
#include <assert.h>
#include <audiere.h>
namespace Mangle {
namespace Sound {
/// Implementation of Sound::Manager for Audiere
class AudiereManager : public Manager
{
audiere::AudioDevicePtr device;
public:
AudiereManager();
virtual Sound *load(const std::string &file, bool stream=false);
/// not implemented yet
virtual Sound *load(Stream::Stream *input, bool stream=false)
{ assert(0); }
/// disabled
virtual Sound *load(InputSource *input, bool stream=false)
{ assert(0); }
/// disabled
virtual void update() { assert(0); }
/// disabled
virtual void setListenerPos(float x, float y, float z,
float fx, float fy, float fz,
float ux, float uy, float uz)
{ assert(0); };
};
/// Audiere Sound implementation
class AudiereSound : public Sound
{
audiere::AudioDevicePtr device;
audiere::SampleSourcePtr sample;
audiere::SampleBufferPtr buf;
bool stream;
public:
virtual Instance *getInstance(bool is3d, bool repeat);
virtual void drop()
{ delete this; }
AudiereSound(const std::string &file, audiere::AudioDevicePtr device,
bool stream);
};
/// Audiere Instance implementation
class AudiereInstance : public Instance
{
audiere::OutputStreamPtr sound;
public:
virtual void play();
virtual void stop();
virtual void pause();
virtual bool isPlaying();
virtual void setVolume(float);
/// disabled
virtual void setPos(float x, float y, float z)
{ assert(0); }
virtual void drop()
{ delete this; }
AudiereInstance(audiere::OutputStreamPtr);
};
}} // Namespace
#endif