# Some inaccuracies in the work of IPlug2 plugins in DAW Kushview Element

**URL:** <https://iplug2.discourse.group/t/some-inaccuracies-in-the-work-of-iplug2-plugins-in-daw-kushview-element/181>\
**Category:** Windows\
**Created:** [6 August 2020 04:57 UTC](https://iplug2.discourse.group/t/some-inaccuracies-in-the-work-of-iplug2-plugins-in-daw-kushview-element/181 "2020-08-06T04:57:49Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![vasyan](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/vasyan/32/82_2.png) [@vasyan](https://iplug2.discourse.group/u/vasyan)\
**Post date:** [6 August 2020 04:57 UTC](https://iplug2.discourse.group/t/some-inaccuracies-in-the-work-of-iplug2-plugins-in-daw-kushview-element/181/1 "2020-08-06T04:57:49Z")

</div>

When loading absolutely any plug-in assembled with the IPlug2 framework or the old IPlug in [DAW Kushview Element](https://github.com/kushview/Element), the plug-in is initialized in mono mode, but other plugins assembled by third-party frameworks are initialized normally, that is, in stereo mode.  
Therefore, I cannot figure out why this is happening?  
Is this a bug of the DAW Kushview Element or an IPlug2 framework?  
I would like to work together to sort out this problem, and if it becomes necessary to contact the developers of Kushview Element, to correct this inaccuracy in the work.

---

<div class="post-metadata">

**Author:** ![vasyan](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/vasyan/32/82_2.png) [@vasyan](https://iplug2.discourse.group/u/vasyan)\
**Post date:** [9 August 2020 15:10 UTC](https://iplug2.discourse.group/t/some-inaccuracies-in-the-work-of-iplug2-plugins-in-daw-kushview-element/181/2 "2020-08-09T15:10:54Z")

</div>

The problem concerns everyone who writes plugins on the IPlug2 framework, because sooner or later one of the users will inform you about this bug.  
By the way, the same VST3 plugins are loaded normally.

---

<div class="post-metadata">

**Author:** ![olilarkin](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/olilarkin/32/2_2.png) [@olilarkin](https://iplug2.discourse.group/u/olilarkin)\
**Post date:** [9 August 2020 15:27 UTC](https://iplug2.discourse.group/t/some-inaccuracies-in-the-work-of-iplug2-plugins-in-daw-kushview-element/181/3 "2020-08-09T15:27:32Z")

</div>

How about you have a go at fixing it? Start by looking at the juce demo host and see if the behaviour is the same, since elements is based on Juce

---

<div class="post-metadata">

**Author:** ![vasyan](https://yyz2.discourse-cdn.com/free1/user_avatar/iplug2.discourse.group/vasyan/32/82_2.png) [@vasyan](https://iplug2.discourse.group/u/vasyan)\
**Post date:** [10 August 2020 16:32 UTC](https://iplug2.discourse.group/t/some-inaccuracies-in-the-work-of-iplug2-plugins-in-daw-kushview-element/181/4 "2020-08-10T16:32:54Z")

</div>

> [@olilarkin](#):
>
> juce demo host

Thanks!  
I found some inconsistency in the code in the **IPlugVST2.cpp** file, which causes incorrect initialization of plugins in hosts using the Juce framework.  
This is exactly what this piece of code is:

```
 case effGetSpeakerArrangement:
    {
      VstSpeakerArrangement **ppInputArr = (VstSpeakerArrangement**) value;
      VstSpeakerArrangement **ppOutputArr = (VstSpeakerArrangement**) ptr;
      if (ppInputArr)
      {
        * ppInputArr = & (_ this-> mInputSpkrArr);
      }
      if (ppOutputArr)
      {
        * ppOutputArr = & (_ this-> mOutputSpkrArr);
      }
      return 1;
    }

```

I looked at how this is done in third-party plugins, using **audioeffectx.cpp** as an example:

```
case effGetSpeakerArrangement:
v = getSpeakerArrangement (FromVstPtr <VstSpeakerArrangement *> (value), (VstSpeakerArrangement **) ptr)? ten;
break;

```

where in **audioeffectx.h** there is a virtual method declaration getSpeakerArrangement (), which is implemented by default like this:

`virtual bool getSpeakerArrangement (VstSpeakerArrangement **pluginInput, VstSpeakerArrangement** pluginOutput) {* pluginInput = 0; * pluginOutput = 0; return false; } /// <Return the plug-in's speaker arrangements`

as a result I made a fix in **IPlugVST2.cpp** :

```
case effGetSpeakerArrangement:
    {
      VstSpeakerArrangement **ppInputArr = (VstSpeakerArrangement**) value;
      VstSpeakerArrangement **ppOutputArr = (VstSpeakerArrangement**) ptr;
      if (ppInputArr) * ppInputArr = nullptr;
      if (ppOutputArr) * ppOutputArr = nullptr;
      return 0;
    }

```

With this change, the problem went away.

It would be very nice if a virtual method similar to `getSpeakerArrangement()` was called in **IPlugVST2.cpp** so that the developer can override it at his own discretion. However, at the moment, there is no such possibility.
