Skip to content

Commit

Permalink
- fix #573 (allow the AudioAnalyser floating tile to connect to scrip…
Browse files Browse the repository at this point in the history
…tnode display buffers)
  • Loading branch information
christoph-hart committed Sep 30, 2024
1 parent 56f5d95 commit c08142b
Show file tree
Hide file tree
Showing 3 changed files with 37 additions and 8 deletions.
2 changes: 1 addition & 1 deletion currentGitHash.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6c1c41e7f06b4a4ddcbb87ce5cf1647525e309f1
56f5d952eaa1a4f4977e0330fbfdc3dfc2806b6f
2 changes: 1 addition & 1 deletion hi_backend/backend/currentGit.h
Original file line number Diff line number Diff line change
@@ -1 +1 @@
#define PREVIOUS_HISE_COMMIT "6c1c41e7f06b4a4ddcbb87ce5cf1647525e309f1"
#define PREVIOUS_HISE_COMMIT "56f5d952eaa1a4f4977e0330fbfdc3dfc2806b6f"
41 changes: 35 additions & 6 deletions hi_core/hi_modules/effects/fx/Analyser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -97,14 +97,43 @@ Component* AudioAnalyserComponent::Panel::createContentComponent(int index)
{
Component* c = nullptr;

switch (index)
if(dynamic_cast<hise::AnalyserEffect*>(getProcessor()) == nullptr)
{
case 0: c = new Goniometer(getProcessor()); break;
case 1: c = new Oscilloscope(getProcessor()); break;
case 2: c = new FFTDisplay(getProcessor()); break;
default:
return nullptr;
if(auto ed = dynamic_cast<ProcessorWithExternalData*>(getProcessor()))
{
if(isPositiveAndBelow(index, ed->getNumDataObjects(ExternalData::DataType::DisplayBuffer)))
{
auto rb = ed->getDisplayBuffer(index);
jassert(rb != nullptr);

auto obj = rb->getPropertyObject();
auto editor = obj->createComponent();

editor->setComplexDataUIBase(rb);



c = dynamic_cast<Component*>(editor);

c->setColour(0, findPanelColour(PanelColourId::bgColour));
c->setColour(1, findPanelColour(PanelColourId::itemColour1));
c->setColour(2, findPanelColour(PanelColourId::itemColour2));
}
}
}
else
{
switch (index)
{
case 0: c = new Goniometer(getProcessor()); break;
case 1: c = new Oscilloscope(getProcessor()); break;
case 2: c = new FFTDisplay(getProcessor()); break;
default:
return nullptr;
}
}



if (findPanelColour(FloatingTileContent::PanelColourId::bgColour).isOpaque())
c->setOpaque(true);
Expand Down

0 comments on commit c08142b

Please sign in to comment.