2017-01-16 08:40:33 +00:00
|
|
|
#ifndef __URDE_CSTREAMAUDIOMANAGER_HPP__
|
|
|
|
#define __URDE_CSTREAMAUDIOMANAGER_HPP__
|
|
|
|
|
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
|
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
|
|
|
|
class CStreamAudioManager
|
|
|
|
{
|
|
|
|
static u8 g_MusicVolume;
|
|
|
|
static u8 g_SfxVolume;
|
|
|
|
static bool g_MusicUnmute;
|
|
|
|
static bool g_SfxUnmute;
|
|
|
|
|
2017-01-20 03:53:32 +00:00
|
|
|
static float GetTargetDSPVolume(float fileVol, bool music);
|
2017-01-16 08:40:33 +00:00
|
|
|
static void StopStreaming(bool oneshot);
|
|
|
|
static void UpdateDSP(bool oneshot, float dt);
|
|
|
|
static void UpdateDSPStreamers(float dt);
|
2017-02-06 03:21:58 +00:00
|
|
|
static void StopAllStreams();
|
2017-01-16 08:40:33 +00:00
|
|
|
|
|
|
|
public:
|
2017-11-13 06:19:18 +00:00
|
|
|
static void Start(bool oneshot, std::string_view fileName, u8 volume,
|
2017-01-16 08:40:33 +00:00
|
|
|
bool music, float fadeIn, float fadeOut);
|
2017-11-13 06:19:18 +00:00
|
|
|
static void Stop(bool oneshot, std::string_view fileName);
|
2017-01-16 08:40:33 +00:00
|
|
|
static void FadeBackIn(bool oneshot, float fadeTime);
|
|
|
|
static void TemporaryFadeOut(bool oneshot, float fadeTime);
|
|
|
|
static void Update(float dt);
|
2017-02-06 03:21:58 +00:00
|
|
|
static void StopAll();
|
|
|
|
static void SetMusicUnmute(bool unmute);
|
|
|
|
static void SetSfxVolume(u8 volume);
|
|
|
|
static void SetMusicVolume(u8 volume);
|
|
|
|
|
2017-01-16 09:14:54 +00:00
|
|
|
static void Initialize();
|
2017-11-27 05:06:53 +00:00
|
|
|
static void StopOneShot();
|
2017-01-22 01:40:12 +00:00
|
|
|
static void Shutdown();
|
2017-01-16 08:40:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif // __URDE_CSTREAMAUDIOMANAGER_HPP__
|