Sound has states on it now

This commit is contained in:
2025-09-05 12:21:40 +03:00
parent 67e423a77d
commit 76b53b5f71
2 changed files with 16 additions and 2 deletions

View File

@@ -13,11 +13,14 @@ using namespace Corrade;
using namespace _ma;
class Sound {
public:
enum SoundState { Idle, Playing, Paused, Finished };
~Sound();
void Play();
void Pause();
void Reset();
SoundState GetState();
void SetPosition(Magnum::Vector3 position);
Magnum::Vector3 GetPosition();
void SetVolume(float value);
@@ -27,6 +30,7 @@ private:
Sound();
class Engine *baseEngine;
ma_sound maSound;
SoundState state = SoundState::Idle;
friend class Engine;
};