forked from WenlinMao/SleepWalking
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAudioSystem.hpp
More file actions
30 lines (25 loc) · 860 Bytes
/
Copy pathAudioSystem.hpp
File metadata and controls
30 lines (25 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#pragma once
#include "Inivar.hpp"
#include "PlayerStats.hpp"
#include "Scene.hpp"
#include "Sound.hpp"
class AudioSystem {
public:
AudioSystem(AudioSystem const&) = delete;
void operator=(AudioSystem const&) = delete;
static AudioSystem& Instance()
{
static AudioSystem audio_system;
return audio_system;
}
void PlayShortAudio(const AudioSourceList sound, float volume = 1.0f, const glm::vec3& pos = PlayerStats::Instance().player1Pos);
void PlayLongAudio(const AudioSourceList sound, float volume = 1.0f, const glm::vec3& pos = PlayerStats::Instance().player1Pos);
void StopLongAudio(const AudioSourceList sound);
void StopAllAudio();
~AudioSystem();
private:
AudioSystem();
std::shared_ptr< Sound::PlayingSample > foot_steps_ps;
std::shared_ptr< Sound::PlayingSample > time_stop_ps;
std::shared_ptr< Sound::PlayingSample > bgm_ps;
};