persona-3-dual
A DS demake of Persona 3
Loading...
Searching...
No Matches
SFXComponent.hpp
Go to the documentation of this file.
1
6
7#pragma once
10#include "types/aeTypes.hpp"
11#include <aegis/component.hpp>
12#include <string>
13
14class SFXComponent : public ae::Component
15{
16 public:
17 static constexpr ae::ComponentTypeID TYPE_ID = static_cast<ae::ComponentTypeID>(ComponentType::SFX);
18 void init() override
19 {
20 }
21
25 void destroy() override;
26
27 void update(ae::q20_12_t /*dt*/) override
28 {
29 }
30
31 ae::ComponentTypeID getType() const override
32 {
33 return TYPE_ID;
34 }
35
43 void registerSFX(SFX sfx);
44
52 void playSFX(SFX sfx, int volume = 127, int panning = 64);
53
57 void stopSFX();
58
59 protected:
60 void submitToManager() override
61 {
62 }
63
64 private:
65 AudioManager& am = AudioManager::getInstance();
66};
Manager for hardware specific audio functions.
SFX
SFX wrapper enums.
void stopSFX()
Stops all SFX audio from playing.
ae::ComponentTypeID getType() const override
void registerSFX(SFX sfx)
Register the SFX to use.
void playSFX(SFX sfx, int volume=127, int panning=64)
Play the specified SFX, if registered.
AudioManager & am
void destroy() override
Automatically stops all SFX audio from playing.
void submitToManager() override
void update(ae::q20_12_t) override
void init() override
static constexpr ae::ComponentTypeID TYPE_ID