Problem building after creating a project with Introjucer


#1

Hello,

I’m VERY new to Juce.

I am using Mac OSX 10.6.8 with Xcode 4.2.

I have created a project, an audio plug-in, using the Introjucer.
When attempting to build I recieved the following error in ‘PluginProcessor.cpp’:

// This creates new instances of the plugin.. AudioProcessor* JUCE_CALLTYPE createPluginFilter() { return new OneAudioProcessor(); //Error here: Allocating an object of abstract class type 'OneAudioProcessor' }

Can anyone point me in the right direction?


#2

Welcome!

That error simply means “OneAudioProcessor” is missing some methods that needs to be implemented; there’s a whole bunch of pure virtual methods in juce::AudioProcessor.


#3

[quote=“jrlanglois”]Welcome!

That error simply means “OneAudioProcessor” is missing some methods that needs to be implemented; there’s a whole bunch of pure virtual methods in juce::AudioProcessor.[/quote]

Thanks! I think I need to implement the following methods:

[code]/** Returns true if a silent input always produces a silent output. */
virtual bool silenceInProducesSilenceOut() const = 0;

/** Returns the length of the filter's tail, in seconds. */
virtual double getTailLengthSeconds() const = 0;[/code]

Would you be able to tell me how I would go about implementing these?

Sorry for the easy question!


#4

Indeed you do!

    bool silenceInProducesSilenceOut() const { return /*true or false*;/ }
    double getTailLengthSeconds() const { return /*0.0 for no tail, or some value if you're designing a time-based effect like reverb or delay*/; }