summaryrefslogtreecommitdiffstats
path: root/src/sound/oalsound/alsound.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/sound/oalsound/alsound.h')
-rw-r--r--src/sound/oalsound/alsound.h14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/sound/oalsound/alsound.h b/src/sound/oalsound/alsound.h
index 2fdcff5..cd3bdd5 100644
--- a/src/sound/oalsound/alsound.h
+++ b/src/sound/oalsound/alsound.h
@@ -31,10 +31,17 @@
#include <map>
#include <string>
+#include <list>
#include <al.h>
+struct OldMusic {
+ Channel* music;
+ float fadeTime;
+ float currentTime;
+};
+
class ALSound : public CSoundInterface
{
public:
@@ -65,11 +72,11 @@ public:
bool StopAll();
bool MuteAll(bool bMute);
- bool PlayMusic(int rank, bool bRepeat);
- bool PlayMusic(const std::string &filename, bool bRepeat);
+ bool PlayMusic(int rank, bool bRepeat, float fadeTime=5.0f);
+ bool PlayMusic(const std::string &filename, bool bRepeat, float fadeTime=5.0f);
bool RestartMusic();
void SuspendMusic();
- void StopMusic();
+ void StopMusic(float fadeTime=5.0f);
bool IsPlayingMusic();
private:
@@ -86,6 +93,7 @@ private:
std::map<std::string, Buffer*> m_music;
std::map<int, Channel*> m_channels;
Channel *m_currentMusic;
+ std::list<OldMusic> m_oldMusic;
Math::Vector m_eye;
Math::Vector m_lookat;
};