PDA

View Full Version : isInChannelConnected() on reaper (how to detect mono tracks)


pylorca
02-25-2011, 12:22 PM
reaper allways return true because reaper has not mono tracks/busses

Are there any hack to detect mono tracks only for reaper?

Tale
02-25-2011, 01:24 PM
I don't think there is an "official" way, but if your plug-in has (at least) two inputs, then I guess you could so something like this:

bool mMono = true;

...

for (int i = 0; i < nFrames; ++i)
{
mMono = mMono && (inputs[0][i] == inputs[1][i]);

if (mMono)
{
// Mono processing goes here
}
else
{
// Stereo processing goes here
}
}

pylorca
02-25-2011, 02:00 PM
Hi tale!

I had already done something similar but I could not bring myself :p

maybe I put a switch that shown only for reaper like hosts.

I want to switch to mono, only for CPU save.

Thanks anyway :)