How can use "AudioAppComponent" class with Audio_Plugin

Hello,
Actually when i tried to set audio input/output by calling “setAudioChannels (0, 2, nullptr);” or “setAudioChannels (0, 2);”, it shows error as below:

error: cannot call member function ‘void juce::AudioAppComponent::setAudioChannels(int, int, const juce::XmlElement*)’ without object

Then i tried to declare one object by using “juce::AudioAppComponent AudioSource;”, then it shows error as below:

error: cannot declare field ‘NewProjectAudioProcessorEditor::AudioSource’ to be of abstract type ‘juce::AudioAppComponent’
juce::AudioAppComponent AudioSource;

So, can you guide me that how we can use any classes with audio_plugins. May be i missed to follow process to know class declaration process.

You can see that “audio_utils” module also added. I am attaching screenshot image.


Regards,
Kishan Patel.

You shouldn’t use AudioAppComponent in a plugin project, it is meant for stand alone applications and using it in a plugin isn’t likely going to achieve anything useful. Why are you trying to use it?

Ok,
Actually, i am trying play one audio file. I also tried use “AudioDeviceManager” class. But i dont understand that how to use it to play audio-file.
I also test “playTestSound();” function and its working fine. But how can play audio file, i can browse file by using “juce::FileChooser chooser (“Select a Wave file to play…”, {}, “*.wav”);” sample.
How can follow next steps to play that audio file.