COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :

Go Back   Cockos Incorporated Forums > Other Software Discussion > WDL users forum

Reply
 
Thread Tools Display Modes
Old 04-17-2016, 06:03 AM   #1
jack461
Human being with feelings
 
jack461's Avatar
 
Join Date: Nov 2013
Location: France
Posts: 70
Default Incorrect "NInChannels()" / "NOutChannels()" in VST

Hi !
I am developing a plugin with WDL-OL, and it seems to me that the actual number of channels is incorrectly transmitted by the NInChannels() and NOutChannels().

I work on Mac, OS X 10.9.5, Xcode 6.2, Reaper 5.18.0

The plugin is declared with :
#define PLUG_CHANNEL_IO "2-2 4-4 8-8 16-16"
In the resource.h file.

I test the plugin with REAPER, on tracks with 2, 4, 8 or 16 Channels.
REAPER indicates the number of channels; in and out, at the top of the plugin display window.
Alsol I trace NInChannels(), NOutChannels(), and use IsInChannelConnected() and IsOutChannelConnected() to test connected channels.

I get the following results :

VST version :
-----------
2 Ch track :
Reaper says "2/16 in 2/16 out"
NInChannels()=16, connected= 0 to 15
NOutChannels()=16, connected= 0 to 15

4 Ch track :
Reaper says "4/16 in 4/16 out"
NInChannels()=16, connected= 0 to 15
NOutChannels()=16, connected= 0 to 15

8 Ch track :
Reaper says "8/16 in 8/16 out"
NInChannels()=16, connected= 0 to 15
NOutChannels()=16, connected= 0 to 15

16 Ch track :
Reaper says "16 in 16 out"
NInChannels()=16, connected= 0 to 15
NOutChannels()=16, connected= 0 to 15

==========================

AU version :
-----------
2 Ch track :
Reaper says "2 in 2 out"
NInChannels()=16, connected= 0 to 1
NOutChannels()=16, connected= 0 to 1

4 Ch track :
Reaper says "4 in 4 out"
NInChannels()=16, connected= 0 to 3
NOutChannels()=16, connected= 0 to 3

8 Ch track :
Reaper says "8 in 8 out"
NInChannels()=16, connected= 0 to 7
NOutChannels()=16, connected= 0 to 7

16 Ch track :
Reaper says "16 in 16 out"
NInChannels()=16, connected= 0 to 15
NOutChannels()=16, connected= 0 to 15

==========================

So it seems that both for AU and VST, NInChannels() and NOutChannels() are wrong.
For VST, IsInChannelConnected() and IsOutChannelConnected() are also incorrect.
The problem is that for the VST version, I have no way to know the actual number of
channels in the track.

Is there something I am doing wrong ?
Thanks for any help you can provide !
jack461 is offline   Reply With Quote
Old 04-17-2016, 09:48 AM   #2
earlevel
Human being with feelings
 
Join Date: Dec 2015
Posts: 327
Default

Yeah, probably true—I know something is wrong there. My plugin is targeted for AAX, but I started out testing it on AU, and found that it's messed up. I noted it and planned to look after I finish the AAX.

Specifically, my plugin acts differently if its mono-mono, mono-stereo, or stereo-stereo, and I need to know. AAX behaves correctly, but for AU, my notes:

mono-mono:
IsInChannelConnected(1) false
IsOutChannelConnected(1) false
two input buffers (input[1] zeroed)
two output buffers

stereo-stereo:
IsInChannelConnected(1) true
IsOutChannelConnected(1) true

mono-stereo:
IsInChannelConnected(1) true(!)
IsOutChannelConnected(1) true
two input buffers (input[1] duplicated)
two output buffers

Having two buffers for the mono connections is unnecessary, but won't break things (unless you check the number of buffers to determine your configuration). But for mono-stereo, it's also incorrect on the connected channels. That means I can't tell either way if I have mono-stereo.
earlevel is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 11:02 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2020, vBulletin Solutions Inc.