summaryrefslogtreecommitdiffstats
path: root/src/game/client/sound.hh
blob: 23fbca9ee5cfae24f1f071c440dd25cc52e1292a (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
#ifndef CLIENT_SOUND_HH
#define CLIENT_SOUND_HH 1
#pragma once

#include "core/resource.hh"

class ConfigFloat;
struct SoundEffect;

namespace sound
{
extern ConfigFloat volume_master;
extern ConfigFloat volume_effects;
extern ConfigFloat volume_music;
extern ConfigFloat volume_ui;
} // namespace sound

namespace sound
{
void init_config(void);
void init(void);
void init_late(void);
void deinit(void);
void update(void);
} // namespace sound

namespace sound
{
void play_generic(const char* sound, bool looping, float pitch);
void play_entity(entt::entity entity, const char* sound, bool looping, float pitch);
void play_player(const char* sound, bool looping, float pitch);
void play_ui(const char* sound, bool looping, float pitch);
} // namespace sound

namespace sound
{
void play_generic(resource_ptr<SoundEffect> sound, bool looping, float pitch);
void play_entity(entt::entity entity, resource_ptr<SoundEffect> sound, bool looping, float pitch);
void play_player(resource_ptr<SoundEffect> sound, bool looping, float pitch);
void play_ui(resource_ptr<SoundEffect> sound, bool looping, float pitch);
} // namespace sound

#endif // CLIENT_SOUND_HH