Skip to content

Commit

Permalink
Tweaks for Generic Filter Plotter (#537)
Browse files Browse the repository at this point in the history
  • Loading branch information
jatinchowdhury18 authored Jun 11, 2024
1 parent 14258e7 commit a1fe2e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,10 @@ std::pair<const std::vector<float>&, const std::vector<float>&> GenericFilterPlo

void GenericFilterPlotter::updateFilterPlot()
{
plotPath.clear();
const auto [_, magResponseDBSmoothed] = plotFilterMagnitudeResponse();

const juce::ScopedLock pathLock { pathMutex };
plotPath.clear();
bool started = false;
for (size_t i = 0; i < freqAxis.size(); ++i)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ class GenericFilterPlotter

const Params params;

juce::CriticalSection pathMutex {};

private:
void computeFrequencyResponse();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ namespace detail
void startTask();
void stopTask();

private:
struct TimeSliceThread : juce::TimeSliceThread
{
TimeSliceThread() : juce::TimeSliceThread ("Audio UI Background Thread") {}
};

private:
juce::SharedResourcePointer<TimeSliceThread> sharedTimeSliceThread;
juce::TimeSliceThread* timeSliceThreadToUse = sharedTimeSliceThread;
};
Expand Down

0 comments on commit a1fe2e8

Please sign in to comment.