From ef9cb31204b1a9d8e7c13700e92751aebe39cfb7 Mon Sep 17 00:00:00 2001 From: WerWolv Date: Sun, 11 Jun 2023 00:08:34 +0200 Subject: [PATCH] patterns: Updated pattern language --- lib/external/pattern_language | 2 +- plugins/builtin/source/content/pl_visualizers.cpp | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/external/pattern_language b/lib/external/pattern_language index b7ab96a11..70fc07d46 160000 --- a/lib/external/pattern_language +++ b/lib/external/pattern_language @@ -1 +1 @@ -Subproject commit b7ab96a1150b773e9408398a6125e8df5c29b02e +Subproject commit 70fc07d46f48901d79230ec9f45abd203dbe8f67 diff --git a/plugins/builtin/source/content/pl_visualizers.cpp b/plugins/builtin/source/content/pl_visualizers.cpp index b8e8c96e6..5662f4542 100644 --- a/plugins/builtin/source/content/pl_visualizers.cpp +++ b/plugins/builtin/source/content/pl_visualizers.cpp @@ -55,7 +55,7 @@ namespace hex::plugin::builtin { if (shouldReset) { values.clear(); - values = sampleData(patternToArray(dataPattern), ImPlot::GetPlotSize().x * 4); + values = sampleData(patternToArray(dataPattern.get()), ImPlot::GetPlotSize().x * 4); } ImPlot::PlotLine("##line", values.data(), values.size()); @@ -75,8 +75,8 @@ namespace hex::plugin::builtin { if (shouldReset) { xValues.clear(); yValues.clear(); - xValues = sampleData(patternToArray(xPattern), ImPlot::GetPlotSize().x * 4); - yValues = sampleData(patternToArray(yPattern), ImPlot::GetPlotSize().x * 4); + xValues = sampleData(patternToArray(xPattern.get()), ImPlot::GetPlotSize().x * 4); + yValues = sampleData(patternToArray(yPattern.get()), ImPlot::GetPlotSize().x * 4); } ImPlot::PlotScatter("##scatter", xValues.data(), yValues.data(), xValues.size()); @@ -206,8 +206,8 @@ namespace hex::plugin::builtin { } if (shouldReset) { - vertices = patternToArray(verticesPattern); - indices = patternToArray(indicesPattern); + vertices = patternToArray(verticesPattern.get()); + indices = patternToArray(indicesPattern.get()); normals.clear(); normals.resize(vertices.size()); @@ -360,7 +360,7 @@ namespace hex::plugin::builtin { resetTask = TaskManager::createTask("Visualizing...", TaskManager::NoProgress, [=](Task &) { ma_device_stop(&audioDevice); - waveData = patternToArray(wavePattern); + waveData = patternToArray(wavePattern.get()); sampledData = sampleData(waveData, 300_scaled * 4); index = 0;