Skip to content

Commit

Permalink
m
Browse files Browse the repository at this point in the history
  • Loading branch information
zsliu98 committed Nov 21, 2024
1 parent d0acb09 commit 3b49c9e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions source/PluginProcessor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ void PluginProcessor::prepareToPlay(double sampleRate, int samplesPerBlock) {
// Use this method as the place to do any pre-playback
// initialisation that you need..
juce::ignoreUnused(sampleRate, samplesPerBlock);
triggerAsyncUpdate();
}

void PluginProcessor::releaseResources() {
Expand Down
6 changes: 5 additions & 1 deletion source/PluginProcessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#include "ipps.h"
#endif

class PluginProcessor : public juce::AudioProcessor {
class PluginProcessor : public juce::AudioProcessor , private juce::AsyncUpdater {
public:
PluginProcessor();

Expand Down Expand Up @@ -50,4 +50,8 @@ class PluginProcessor : public juce::AudioProcessor {

private:
JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (PluginProcessor)

void handleAsyncUpdate() override {
setLatencySamples(10);
}
};

0 comments on commit 3b49c9e

Please sign in to comment.