8#ifndef GLISTENGINE_GSOUND_H
9#define GLISTENGINE_GSOUND_H
37 int load(
const std::string& fullPath)
override;
45 int loadSound(
const std::string& soundPath)
override;
128 bool isloaded =
false;
129 bool isplaying =
false;
130 bool ispaused =
false;
133 std::string filepath;
135 int lastposition = 0;
Definition gBaseSound.h:15
LoopType
Definition gBaseSound.h:17
@ LOOPTYPE_DEFAULT
Definition gBaseSound.h:18
A sound class using miniaudio with ma_engine and ma_sound.
Definition gSound.h:25
void play() override
Starts sound playback and resets the position to the beginning.
float getVolume() override
Gets the current volume level.
void setPaused(bool isPaused) override
Pauses or resumes the playback.
LoopType getLoopType() override
void setPosition(int position) override
Sets the current playback position in milliseconds.
int getDuration() override
Returns the total duration of the sound in milliseconds.
bool isPlaying() override
void stop() override
Stops playback and resets position to the beginning.
const std::string & getPath() override
Gets the path to the currently loaded file.
int load(const std::string &fullPath) override
Loads a sound file from the full file system path.
void setLoopType(LoopType loopType) override
Sets the loop type for playback.
int getPosition() override
Returns the current playback position in milliseconds.
int loadSound(const std::string &soundPath) override
Loads the sound file from the given project-relative path.
void setVolume(float volume) override
Sets the volume level.
void close() override
Unloads and frees the sound resource.
ma_engine * gGetSoundEngine()