2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-01-16 08:40:33 +00:00
|
|
|
|
2019-09-28 02:53:03 +00:00
|
|
|
#include <string_view>
|
|
|
|
|
|
|
|
#include "Runtime/GCNTypes.hpp"
|
2017-01-16 08:40:33 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
namespace urde {
|
2017-01-16 08:40:33 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
class CStreamAudioManager {
|
|
|
|
static u8 g_MusicVolume;
|
|
|
|
static u8 g_SfxVolume;
|
|
|
|
static bool g_MusicUnmute;
|
|
|
|
static bool g_SfxUnmute;
|
2017-01-16 08:40:33 +00:00
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
static float GetTargetDSPVolume(float fileVol, bool music);
|
|
|
|
static void StopStreaming(bool oneshot);
|
|
|
|
static void UpdateDSP(bool oneshot, float dt);
|
|
|
|
static void UpdateDSPStreamers(float dt);
|
|
|
|
static void StopAllStreams();
|
2017-01-16 08:40:33 +00:00
|
|
|
|
|
|
|
public:
|
2018-12-08 05:30:43 +00:00
|
|
|
static void Start(bool oneshot, std::string_view fileName, float volume, bool music, float fadeIn, float fadeOut);
|
|
|
|
static void Stop(bool oneshot, std::string_view fileName);
|
|
|
|
static void FadeBackIn(bool oneshot, float fadeTime);
|
|
|
|
static void TemporaryFadeOut(bool oneshot, float fadeTime);
|
|
|
|
static void Update(float dt);
|
|
|
|
static void StopAll();
|
|
|
|
static void SetMusicUnmute(bool unmute);
|
|
|
|
static void SetSfxVolume(u8 volume);
|
|
|
|
static void SetMusicVolume(u8 volume);
|
|
|
|
|
|
|
|
static void Initialize();
|
|
|
|
static void StopOneShot();
|
|
|
|
static void Shutdown();
|
2017-01-16 08:40:33 +00:00
|
|
|
};
|
|
|
|
|
2018-12-08 05:30:43 +00:00
|
|
|
} // namespace urde
|