From 640f6af291a16a7e197f420d5a344ea443443c26 Mon Sep 17 00:00:00 2001 From: cat Date: Tue, 9 Sep 2025 02:31:40 +0300 Subject: [PATCH] Renamed runtime functions to make more sense --- src/ChargeAudio.hpp | 5 +++-- src/Sound.cpp | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/ChargeAudio.hpp b/src/ChargeAudio.hpp index 696ff22..ad783be 100644 --- a/src/ChargeAudio.hpp +++ b/src/ChargeAudio.hpp @@ -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); diff --git a/src/Sound.cpp b/src/Sound.cpp index dd907ee..288b7ec 100644 --- a/src/Sound.cpp +++ b/src/Sound.cpp @@ -27,13 +27,13 @@ Sound::Sound(Engine *engine, std::function 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;