From 61fea1d957bf49b7d889392cdff716d1c17352d6 Mon Sep 17 00:00:00 2001 From: defiantnerd <97224712+defiantnerd@users.noreply.github.com> Date: Mon, 10 Jun 2024 13:39:20 +0200 Subject: [PATCH] setting song_pos_seconds always --- src/detail/vst3/process.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/detail/vst3/process.cpp b/src/detail/vst3/process.cpp index 23f5ba89..2e25faa3 100644 --- a/src/detail/vst3/process.cpp +++ b/src/detail/vst3/process.cpp @@ -223,7 +223,10 @@ void ProcessAdapter::process(Steinberg::Vst::ProcessData& data) ; _transport.song_pos_beats = 0; - _transport.song_pos_seconds = 0; + + // samplerate and projectTimeSamples are always valid + _transport.song_pos_seconds = + _vstdata->processContext->projectTimeSamples / _vstdata->processContext->sampleRate; if ((_vstdata->processContext->state & Vst::ProcessContext::kProjectTimeMusicValid)) {