summaryrefslogtreecommitdiffstats
path: root/platform/web/audio_driver_web.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/web/audio_driver_web.cpp')
-rw-r--r--platform/web/audio_driver_web.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/platform/web/audio_driver_web.cpp b/platform/web/audio_driver_web.cpp
index 22487d2756..5e046d7050 100644
--- a/platform/web/audio_driver_web.cpp
+++ b/platform/web/audio_driver_web.cpp
@@ -312,6 +312,11 @@ bool AudioDriverWeb::is_sample_playback_active(const Ref<AudioSamplePlayback> &p
return godot_audio_sample_is_active(itos(p_playback->get_instance_id()).utf8().get_data()) != 0;
}
+double AudioDriverWeb::get_sample_playback_position(const Ref<AudioSamplePlayback> &p_playback) {
+ ERR_FAIL_COND_V_MSG(p_playback.is_null(), false, "Parameter p_playback is null.");
+ return godot_audio_get_sample_playback_position(itos(p_playback->get_instance_id()).utf8().get_data());
+}
+
void AudioDriverWeb::update_sample_playback_pitch_scale(const Ref<AudioSamplePlayback> &p_playback, float p_pitch_scale) {
ERR_FAIL_COND_MSG(p_playback.is_null(), "Parameter p_playback is null.");
godot_audio_sample_update_pitch_scale(