summaryrefslogtreecommitdiffstats
path: root/src/sound/oalsound/alsound.h
diff options
context:
space:
mode:
authorerihel <erihel@gmail.com>2013-12-19 22:41:16 +0100
committererihel <erihel@gmail.com>2013-12-19 22:46:29 +0100
commitfe3f9ea38cfae89fdd83d4c3fe79ea355f50bce9 (patch)
treeec9e29f8a9ae321c9e5aaa8532e4c87f2dec4d0f /src/sound/oalsound/alsound.h
parent114cbec8a9859f19d4234659bd4951f540825dd3 (diff)
downloadcolobot-fe3f9ea38cfae89fdd83d4c3fe79ea355f50bce9.tar.gz
colobot-fe3f9ea38cfae89fdd83d4c3fe79ea355f50bce9.tar.bz2
colobot-fe3f9ea38cfae89fdd83d4c3fe79ea355f50bce9.zip
Sound support changes
* removed 2d sound * fixed listener orientation (propably issue #235) * removed unused code and minor refactoring
Diffstat (limited to 'src/sound/oalsound/alsound.h')
-rw-r--r--src/sound/oalsound/alsound.h26
1 files changed, 7 insertions, 19 deletions
diff --git a/src/sound/oalsound/alsound.h b/src/sound/oalsound/alsound.h
index cd44ae9..2fdcff5 100644
--- a/src/sound/oalsound/alsound.h
+++ b/src/sound/oalsound/alsound.h
@@ -41,55 +41,43 @@ public:
ALSound();
~ALSound();
- bool Create(bool b3D);
- bool Cache(Sound, std::string);
- bool CacheMusic(std::string);
+ bool Create();
+ bool Cache(Sound, const std::string &);
+ bool CacheMusic(const std::string &);
bool GetEnable();
- void SetSound3D(bool bMode);
- bool GetSound3D();
- bool GetSound3DCap();
-
void SetAudioVolume(int volume);
int GetAudioVolume();
void SetMusicVolume(int volume);
int GetMusicVolume();
- void SetListener(Math::Vector eye, Math::Vector lookat);
+ void SetListener(const Math::Vector &eye, const Math::Vector &lookat);
void FrameMove(float rTime);
int Play(Sound sound, float amplitude=1.0f, float frequency=1.0f, bool bLoop = false);
- int Play(Sound sound, Math::Vector pos, float amplitude=1.0f, float frequency=1.0f, bool bLoop = false);
+ int Play(Sound sound, const Math::Vector &pos, float amplitude=1.0f, float frequency=1.0f, bool bLoop = false);
bool FlushEnvelope(int channel);
bool AddEnvelope(int channel, float amplitude, float frequency, float time, SoundNext oper);
- bool Position(int channel, Math::Vector pos);
+ bool Position(int channel, const Math::Vector &pos);
bool Frequency(int channel, float frequency);
bool Stop(int channel);
bool StopAll();
bool MuteAll(bool bMute);
bool PlayMusic(int rank, bool bRepeat);
- bool PlayMusic(std::string filename, bool bRepeat);
+ bool PlayMusic(const std::string &filename, bool bRepeat);
bool RestartMusic();
void SuspendMusic();
void StopMusic();
bool IsPlayingMusic();
- // plugin interface
- std::string PluginName();
- int PluginVersion();
- void InstallPlugin();
- bool UninstallPlugin(std::string &);
-
private:
void CleanUp();
int GetPriority(Sound);
bool SearchFreeBuffer(Sound sound, int &channel, bool &bAlreadyLoaded);
- void ComputeVolumePan2D(int channel, Math::Vector &pos);
bool m_enabled;
- bool m_3D;
float m_audioVolume;
float m_musicVolume;
ALCdevice* m_device;