Skip to content

Commit

Permalink
Always set time frame information for JUCE hosted plugins
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Oct 31, 2022
1 parent ecc522d commit 4495215
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions source/backend/plugin/CarlaPluginJuce.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1323,6 +1323,8 @@ class CarlaPluginJuce : public CarlaPlugin,
const EngineTimeInfo& timeInfo(pData->engine->getTimeInfo());

fPosInfo.setIsPlaying(timeInfo.playing);
fPosInfo.setTimeInSamples(static_cast<int64_t>(timeInfo.frame));
fPosInfo.setTimeInSeconds(static_cast<double>(timeInfo.frame)/pData->engine->getSampleRate());

if (timeInfo.bbt.valid)
{
Expand All @@ -1339,9 +1341,6 @@ class CarlaPluginJuce : public CarlaPlugin,
fPosInfo.setTimeSignature(TimeSignature{static_cast<int>(timeInfo.bbt.beatsPerBar+0.5f),
static_cast<int>(timeInfo.bbt.beatType+0.5f)});

fPosInfo.setTimeInSamples(static_cast<int64_t>(timeInfo.frame));
fPosInfo.setTimeInSeconds(static_cast<double>(timeInfo.frame)/pData->engine->getSampleRate());

fPosInfo.setPpqPosition(ppqBar + ppqBeat + ppqTick);
fPosInfo.setPpqPositionOfLastBarStart(ppqBar);
}
Expand Down

0 comments on commit 4495215

Please sign in to comment.