Skip to content

Commit

Permalink
PINK: changed way of getting sample
Browse files Browse the repository at this point in the history
  • Loading branch information
voltya authored and sev- committed Jun 28, 2018
1 parent 81f60be commit c75e048
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion engines/pink/sound.h
Expand Up @@ -24,6 +24,7 @@
#define PINK_SOUND_H

#include "audio/mixer.h"
#include "audio/timestamp.h"

#include "common/system.h"

Expand All @@ -45,7 +46,7 @@ class Sound {

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;
Expand Down

0 comments on commit c75e048

Please sign in to comment.