diff --git a/src/sound.c b/src/sound.c index 13bbe9d..9778c82 100644 --- a/src/sound.c +++ b/src/sound.c @@ -194,6 +194,10 @@ void soundStop(Sound sound) { } +double soundDuration(Sound sound) + { return ready && sound->instance->chunk ? sound->instance->chunk->alen/44100.0/2/2 : 0; } + + void heliSoundUpdate() { trashProcess(); } diff --git a/src/sound.h b/src/sound.h index a3779d7..c71542b 100644 --- a/src/sound.h +++ b/src/sound.h @@ -14,6 +14,7 @@ void soundDestroy(Sound sound); Sound soundClone(Sound sound); void soundPlay(Sound sound, int loop); void soundStop(Sound sound); +double soundDuration(Sound sound); #endif