From c75e048d2c1536aeb54bfabc73d2343fc5e410b5 Mon Sep 17 00:00:00 2001 From: Andrei Prykhodko Date: Sat, 23 Jun 2018 09:54:33 +0300 Subject: PINK: changed way of getting sample --- engines/pink/sound.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/engines/pink/sound.h b/engines/pink/sound.h index 28de99d3f7..b89f0e4abc 100644 --- a/engines/pink/sound.h +++ b/engines/pink/sound.h @@ -24,6 +24,7 @@ #define PINK_SOUND_H #include "audio/mixer.h" +#include "audio/timestamp.h" #include "common/system.h" @@ -45,7 +46,7 @@ public: void pause(bool paused) { g_system->getMixer()->pauseHandle(_handle, paused); } - uint64 getCurrentSample() { return (uint64)g_system->getMixer()->getSoundElapsedTime(_handle) * 22050 / 1000; } + uint32 getCurrentSample() { return g_system->getMixer()->getElapsedTime(_handle).totalNumberOfFrames(); } private: Audio::SoundHandle _handle; -- cgit v1.2.3