# How can use "AudioAppComponent" class with Audio\_Plugin

**URL:** <https://forum.juce.com/t/how-can-use-audioappcomponent-class-with-audio-plugin/40877>\
**Category:** General JUCE discussion\
**Created:** [July 24, 2020, 5:49am UTC](https://forum.juce.com/t/how-can-use-audioappcomponent-class-with-audio-plugin/40877 "2020-07-24T05:49:50Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![kishanpatel](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@kishanpatel](https://forum.juce.com/u/kishanpatel)\
**Post date:** [July 24, 2020, 5:49am UTC](https://forum.juce.com/t/how-can-use-audioappcomponent-class-with-audio-plugin/40877/1 "2020-07-24T05:49:50Z")

</div>

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.

 ![Screenshot from 2020-07-24 11-24-57](https://us1.discourse-cdn.com/flex026/uploads/juce/original/2X/9/9ec70a5a725ea3586e88e2c71560498cdfe936f1.png)  
Regards,  
Kishan Patel.

---

<div class="post-metadata">

**Author:** ![xenakios](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/xenakios/32/4047_2.png) [@xenakios](https://forum.juce.com/u/xenakios)\
**Post date:** [July 24, 2020, 10:08am UTC](https://forum.juce.com/t/how-can-use-audioappcomponent-class-with-audio-plugin/40877/2 "2020-07-24T10:08:51Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![kishanpatel](https://avatars.discourse-cdn.com/v4/letter/k/35a633/32.png) [@kishanpatel](https://forum.juce.com/u/kishanpatel)\
**Post date:** [July 24, 2020, 11:44am UTC](https://forum.juce.com/t/how-can-use-audioappcomponent-class-with-audio-plugin/40877/3 "2020-07-24T11:44:29Z")

</div>

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.
