group2 0.1.0
CSE 125 Group 2
Loading...
Searching...
No Matches
SfxTypes.hpp
Go to the documentation of this file.
1
3
4#pragma once
5
6#include <SDL3/SDL_audio.h>
7
8#include <cstdint>
9#include <vector>
10
12enum class SfxId : uint8_t
13{
14 // Weapons
15 RifleFire,
19
20 // Impacts / hitmarkers
21 FleshHit,
22 Headshot,
23 Explosion,
24
25 // Player feedback
28 Death,
29 Respawn,
31
32 // Charge rifle
35
36 // Energy beam
38
39 // Healing / Shield
40 Healing,
42
43 _Count
44};
45
47enum class SfxCategory : uint8_t
48{
49 Weapons,
50 Impacts,
51 Player,
52 UI,
53 _Count
54};
55
58{
59 std::vector<uint8_t> pcmData;
60 SDL_AudioSpec spec{};
61 float durationSeconds = 0.0f;
63 float defaultGain = 1.0f;
64 float minCooldown = 0.05f;
65 bool loaded = false;
66};
SfxId
Identifies a loaded sound clip.
Definition SfxTypes.hpp:13
@ Headshot
Voicy_Headshot Rapid SFX.mp3.
@ DamageTaken
Voicy_roblox ooof.mp3.
@ RifleFire
Voicy_Charge Rifle SFX.mp3.
@ ChargeRifleLoad
charge-rifle-load.wav (play once when charge starts)
@ Death
Voicy_Minecraft Death Sound.mp3.
@ EnergyGunFire
Voicy_Charge Rifle SFX.mp3.
@ Healing
Voicy_Syringe SFX .mp3.
@ Explosion
Voicy_Minecraft TNT Explosion.mp3.
@ RocketFire
Voicy_Minecraft TNT Explosion.mp3.
@ KillConfirm
Voicy_Pilot Killed Indicator SFX.mp3.
@ EnergyBeamLoop
Voicy_Thunderstruck into.mp3 (play while beam active)
@ Respawn
Voicy_totem of undying sfx .mp3.
@ FleshHit
Voicy_Flesh Bullet Impact SFX.mp3.
@ ChargeRifleShoot
charge-rifle-shoot.wav (play on release)
@ ShieldRecharge
Voicy_Halo Shield Recharge.mp3.
@ RailGunFire
Voicy_Charge Rifle SFX.mp3.
@ ArmorBreak
Voicy_Fortnite Shield Break.mp3.
SfxCategory
Sound category for per-category volume control.
Definition SfxTypes.hpp:48
A decoded sound clip ready for playback.
Definition SfxTypes.hpp:58
float defaultGain
Base volume for this clip.
Definition SfxTypes.hpp:63
float durationSeconds
Total playback duration in seconds.
Definition SfxTypes.hpp:61
std::vector< uint8_t > pcmData
Raw PCM samples (S16LE, interleaved channels).
Definition SfxTypes.hpp:59
SfxCategory category
Definition SfxTypes.hpp:62
float minCooldown
Minimum seconds between repeated plays.
Definition SfxTypes.hpp:64
bool loaded
True when the clip was decoded successfully.
Definition SfxTypes.hpp:65
SDL_AudioSpec spec
Format descriptor matching pcmData.
Definition SfxTypes.hpp:60