Renamed runtime functions to make more sense

This commit is contained in:
2025-09-09 02:31:40 +03:00
parent 0d2603abf0
commit 640f6af291
2 changed files with 5 additions and 4 deletions

View File

@@ -22,8 +22,9 @@ public:
void Reset();
SoundState GetState();
float GetTotalRuntime();
float GetRuntime();
float GetDuration();
float GetPlaybackTime();
bool SetRuntime();
void SetPosition(Magnum::Vector3 position);
Magnum::Vector3 GetPosition();
void SetVolume(float value);

View File

@@ -27,13 +27,13 @@ Sound::Sound(Engine *engine, std::function<void(Sound *)> setupFunction,
Sound::~Sound() { ma_sound_uninit(&maSound); }
Sound::SoundState Sound::GetState() { return state; }
float Sound::GetTotalRuntime() {
float Sound::GetDuration() {
float time;
ma_sound_get_length_in_seconds(&this->maSound, &time);
return time;
}
float Sound::GetRuntime() {
float Sound::GetPlaybackTime() {
float time;
ma_sound_get_cursor_in_seconds(&this->maSound, &time);
return time;