# Using the Tracktion engine within a plugin?

**URL:** <https://forum.juce.com/t/using-the-tracktion-engine-within-a-plugin/32563>\
**Category:** Tracktion Engine\
**Created:** [March 28, 2019, 3:23pm UTC](https://forum.juce.com/t/using-the-tracktion-engine-within-a-plugin/32563 "2019-03-28T15:23:22Z")\
**Posts on this page:** 1\
**Showing post:** 11

<div class="post-metadata">

**Author:** ![RolandMR](https://sea2.discourse-cdn.com/flex026/user_avatar/forum.juce.com/rolandmr/32/641_2.png) [@RolandMR](https://forum.juce.com/u/RolandMR)\
**Post date:** [November 28, 2019, 5:52pm UTC](https://forum.juce.com/t/using-the-tracktion-engine-within-a-plugin/32563/11 "2019-11-28T17:52:32Z")

</div>

See the `HostedAudioDeviceInterface` class. When running in a plugin, the Engine sees this class as the AudioDevice. If you set `useMidiDevices` to true it will access the system MIDI devices, otherwise you are responsible for passing in a block of MIDI data.

When using the `HostedAudioDeviceInterface` it will never try and access audio hardware.

First thing you should do in your plugin is get the hosted interface and initialize it.

```auto
    EngineInPluginDemo()
        : AudioProcessor (BusesProperties().withInput ("Input", AudioChannelSet::stereo())
                                           .withOutput ("Output", AudioChannelSet::stereo())),
        audioInterface (engine.getDeviceManager().getHostedAudioDeviceInterface())
    {
        audioInterface.initialise ({});
    }

```

---

_[View the full topic](https://forum.juce.com/t/using-the-tracktion-engine-within-a-plugin/32563)._
