1
0
Fork 1
mirror of https://github.com/TES3MP/openmw-tes3mp.git synced 2025-01-30 13:15:32 +00:00
openmw-tes3mp/apps/openmw/mwsound/sound.hpp

37 lines
860 B
C++
Raw Normal View History

2012-03-17 09:45:18 +00:00
#ifndef GAME_SOUND_SOUND_H
#define GAME_SOUND_SOUND_H
namespace MWSound
{
class Sound
{
virtual void update(const float *pos) = 0;
2012-03-17 09:45:18 +00:00
Sound& operator=(const Sound &rhs);
Sound(const Sound &rhs);
protected:
float mVolume; /* NOTE: Real volume = mVolume*mBaseVolume */
float mBaseVolume;
float mMinDistance;
float mMaxDistance;
2012-03-17 09:45:18 +00:00
public:
virtual void stop() = 0;
virtual bool isPlaying() = 0;
virtual void setVolume(float volume) = 0;
Sound() : mVolume(1.0f)
, mBaseVolume(1.0f)
, mMinDistance(20.0f) /* 1 * min_range_scale */
, mMaxDistance(12750.0f) /* 255 * max_range_scale */
{ }
2012-03-17 09:45:18 +00:00
virtual ~Sound() { }
friend class OpenAL_Output;
friend class SoundManager;
};
}
#endif