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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 02-24-2017, 04:49 AM   #1
Nowhk
Human being with feelings
 
Join Date: Mar 2016
Posts: 234
Default How would you share a "global" variable for each plugin instance?

Hi all,

I'd like to share for every classes within the same plugin's instance scope a common/global variable.

Such as "gLastTriggeredVoiceIndex" within my VoiceManager class, accessible for each other classes that needs it (Filters, Envelopes, and so on), but of course without passing to them a reference/pointer (keeping all stuff separated).

Each instance of the plugin should have its own VoiceManager instance, so its own gLastTriggeredVoiceIndex (not shared across all instances so).

Do you know any way in IPlug/C++?
static (internal) or external linkage won't works, since it will be the same for every plugin intance.

Thanks
Nowhk is offline   Reply With Quote
 

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 10:58 AM.


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