COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 04-30-2017, 12:27 PM   #1
weblordpepe
Human being with feelings
 
Join Date: Jul 2016
Posts: 33
Default Getting started with WDL in 2017

Hi guys. I'm having trouble getting off the ground.

I need a bit of help getting this all straight, and understanding what old stuff to ignore.

My current understanding is this:
* Iplug is a cuckos framework for plugins & audio sockets/streams.
* WDL is a variety of useful stuff - and includes Iplug.
* WDL no longer includes iplug - a fork of WDL, WDL-OL proved more maintained.

This has really thrown me off. I accidentally downloaded WDL-OL, went through the procedure to install it, only to find the example Visual Studio projects are ancient and don't compile in Visual Studio 2015.

To be up to date and new, should I download Cuckos WDL, but then download the Iplug from WDL-OL?

Furthermore - how do I even get started making an audio plugin with WDL? Do I need to use WDL? Or just iplug?

Am I plagued to install Visual Studio 2003? Does everyone else do that?

I have Visual Studio Community 2015 and anticipate others will use even more recent Visual Studios in the future.

Whats the approach I should be taking? Are there any baby-toys examples for me to follow? Can someone perhaps show me their workflow? I'm dying to get started, but there's a bit too much forking and binary rot going on thats confusing me no end.

Heeelp <3
weblordpepe is offline   Reply With Quote
Old 04-30-2017, 02:43 PM   #2
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default

if you want to make plug-ins just download WDL-OL which contains WDL. The projects should work with visual studio 2015. will try and update it soon, probably with visual studio 2017 projects
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin is offline   Reply With Quote
Old 04-30-2017, 07:26 PM   #3
michaelwayneharwood
Human being with feelings
 
Join Date: Mar 2017
Location: Littleton, CO USA
Posts: 22
Default

I have been using this framework for less than a month, and would strongly suggest starting with either WDL OL or the Tale edition. I use Microsoft Visual Studio Community 2017 with no issues.

Getting things setup can be a bit of work, and while there are a couple of undocumented gotchas here and there if you are comfortable in Visual Studio in general you should be ok.
michaelwayneharwood is offline   Reply With Quote
Old 05-01-2017, 03:13 AM   #4
weblordpepe
Human being with feelings
 
Join Date: Jul 2016
Posts: 33
Default

oh wow really? so this is the right way to go about things?

should i try and load up the projects, and sorta go through the errors & ask for help on here? I was trying to google things but i was a bit lost.

I'm kinda just wanting to get a relatively normal set up like one of you guys so I can get started.
weblordpepe is offline   Reply With Quote
Old 05-01-2017, 03:14 AM   #5
weblordpepe
Human being with feelings
 
Join Date: Jul 2016
Posts: 33
Default

im sorta a bit lost on the GUI side of things.

can perhaps one of you guys tell me how you would make a GUI for a plugin that would work say on PC as a VST and on mac as an AU?

Like which framework do you use and how do you draw/design your GUI? i kinda feel like i need to hold hands with a grown up doing this kinda thing but once i get it ill get it.
weblordpepe is offline   Reply With Quote
Old 05-01-2017, 05:19 AM   #6
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by weblordpepe View Post
im sorta a bit lost on the GUI side of things.

can perhaps one of you guys tell me how you would make a GUI for a plugin that would work say on PC as a VST and on mac as an AU?

Like which framework do you use and how do you draw/design your GUI? i kinda feel like i need to hold hands with a grown up doing this kinda thing but once i get it ill get it.
IPlug/WDL has the needed stuff to do cross platform GUIs, it's in fact one of the biggest reasons you would use something like IPlug to begin with. There are no fancy GUI design facilities though. You need to "design" your GUIs by writing code. If you need things like bitmap graphics, you will need to use software like Photoshop or Gimp to create those.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 05-01-2017, 05:39 AM   #7
michaelwayneharwood
Human being with feelings
 
Join Date: Mar 2017
Location: Littleton, CO USA
Posts: 22
Default

What I would do if I were you is to get your development environment configured properly so that you are able to build the examples provided in the framework on both Windows and OSX first, and focus on building a single target (e.g. app, vst2, etc.) on both. This will help to work out the kinks and make life much easier for you as you learn the framework. In my opinion the example plugins are the place to start to learn how things work.

There are tutorials on the internet that will help in the "hold my hand" category such as Martin Finke's Making Audio Plugins, and searching this forum for specific questions or issues often will provide information to guide you in the right direction even if your specific query is not directly addressed. Oli Larken posted a short explanation of Common Pitfalls for WDL-OL as well.

Be aware that there are some features that are fully fleshed out for one plugin type that may not have the same features enabled in another. As an example MIDI support varies across the targets, and the native message box and file dialogs have some quirks that can be frustrating when cross compiling.

One thing to note - when posting here you are going to get the most benefit if you ask very specific questions and post enough of your code to provide context. The framework is laid out fairly logically, and a little digging into the classes and examples in combination with some experimentation will often times yield insight and answers quicker than posting a question.
michaelwayneharwood is offline   Reply With Quote
Old 05-02-2017, 12:50 PM   #8
weblordpepe
Human being with feelings
 
Join Date: Jul 2016
Posts: 33
Default

Awesome thanks very much guys. I intend to get started and get these example projects going.

Its interesting to note that there is no GUI designer for WDL.

Can you tell me, perhaps either roughly or even with a few examples - why I would use cockos WDL instead of WDL-OL?

Also one more question:
When working on my plugin day to day, do I really just want to export a new VST or a new AU when testing a new release? Or do I keep my VST copy just sorta laying around.

I've noticed that when making cross-platform mobile application frameworks, some times they symlink from the base project to sorta sync things up.
weblordpepe is offline   Reply With Quote
Old 05-02-2017, 12:52 PM   #9
weblordpepe
Human being with feelings
 
Join Date: Jul 2016
Posts: 33
Default

Quote:
Originally Posted by michaelwayneharwood View Post
What I would do if I were you is to get your development environment configured properly so that you are able to build the examples provided in the framework on both Windows and OSX first, and focus on building a single target (e.g. app, vst2, etc.) on both. This will help to work out the kinks and make life much easier for you as you learn the framework. In my opinion the example plugins are the place to start to learn how things work.

There are tutorials on the internet that will help in the "hold my hand" category such as Martin Finke's Making Audio Plugins, and searching this forum for specific questions or issues often will provide information to guide you in the right direction even if your specific query is not directly addressed. Oli Larken posted a short explanation of Common Pitfalls for WDL-OL as well.

Be aware that there are some features that are fully fleshed out for one plugin type that may not have the same features enabled in another. As an example MIDI support varies across the targets, and the native message box and file dialogs have some quirks that can be frustrating when cross compiling.

One thing to note - when posting here you are going to get the most benefit if you ask very specific questions and post enough of your code to provide context. The framework is laid out fairly logically, and a little digging into the classes and examples in combination with some experimentation will often times yield insight and answers quicker than posting a question.
Thanks dude thats really good to know.
This is all helping me a lot. I really want to use WDL because of the cockos philosophy and i trust them to not be bloat piggies.

Too many frameworks these days are all about the oink & not enough about the quack.
weblordpepe is offline   Reply With Quote
Old 05-02-2017, 01:13 PM   #10
Xenakios
Human being with feelings
 
Xenakios's Avatar
 
Join Date: Feb 2007
Location: Oulu, Finland
Posts: 8,062
Default

Quote:
Originally Posted by weblordpepe View Post

Can you tell me, perhaps either roughly or even with a few examples - why I would use cockos WDL instead of WDL-OL?
Very simple : if you want to make VST/AU plugins you don't want to use the official Cockos WDL because it no longer has IPlug included.
__________________
I am no longer part of the REAPER community. Please don't contact me with any REAPER-related issues.
Xenakios is offline   Reply With Quote
Old 05-11-2017, 03:35 AM   #11
User958303869
Human being with feelings
 
Join Date: Sep 2016
Posts: 15
Default

I'm having trouble getting started with wdl-ol in 2017 too, trying to run it on visual 2017. (following along with martin finke's tutorial) When running the .app I'm getting a bunch of "c:\wdl-ol\wdl\zlib\zconf.h(401): fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory". Which I dont understand because these files are definitely there.

Heres the full readout:

1>------ Build started: Project: lice, Configuration: Debug Win32 ------
1>zutil.c
1>c:\wdl-ol\wdl\zlib\zconf.h(401): fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory
1>uncompr.c
1>c:\wdl-ol\wdl\zlib\zconf.h(401): fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory
1>trees.c
1>c:\wdl-ol\wdl\zlib\zconf.h(401): fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory
1>inftrees.c
1>c:\wdl-ol\wdl\zlib\zconf.h(401): fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory
1>inflate.c
1>c:\wdl-ol\wdl\zlib\zconf.h(401): fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory
1>inffast.c
1>c:\wdl-ol\wdl\zlib\zconf.h(401): fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory
1>infback.c
1>c:\wdl-ol\wdl\zlib\zconf.h(401): fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory
1>gzwrite.c
1>c:\wdl-ol\wdl\zlib\gzguts.h(21): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
1>gzread.c
1>c:\wdl-ol\wdl\zlib\gzguts.h(21): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
1>gzlib.c
1>c:\wdl-ol\wdl\zlib\gzguts.h(21): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
1>gzclose.c
1>c:\wdl-ol\wdl\zlib\gzguts.h(21): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
1>deflate.c
1>c:\wdl-ol\wdl\zlib\zconf.h(401): fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory
1>crc32.c
1>c:\wdl-ol\wdl\zlib\zconf.h(401): fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory
1>compress.c
1>c:\wdl-ol\wdl\zlib\zconf.h(401): fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory
1>adler32.c
1>c:\wdl-ol\wdl\zlib\zconf.h(401): fatal error C1083: Cannot open include file: 'sys/types.h': No such file or directory
1>pngwutil.c
1>c:\wdl-ol\wdl\libpng\pngpriv.h(45): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
1>pngwtran.c
1>c:\wdl-ol\wdl\libpng\pngpriv.h(45): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
1>pngwrite.c
1>c:\wdl-ol\wdl\libpng\pngpriv.h(45): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
1>pngwio.c
1>c:\wdl-ol\wdl\libpng\pngpriv.h(45): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
1>pngtrans.c
1>c:\wdl-ol\wdl\libpng\pngpriv.h(45): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
1>Generating Code...
1>Compiling...
1>pngset.c
1>c:\wdl-ol\wdl\libpng\pngpriv.h(45): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
1>pngrutil.c
1>c:\wdl-ol\wdl\libpng\pngpriv.h(45): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
1>pngrtran.c
1>c:\wdl-ol\wdl\libpng\pngpriv.h(45): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
1>pngrio.c
1>c:\wdl-ol\wdl\libpng\pngpriv.h(45): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
1>pngread.c
1>c:\wdl-ol\wdl\libpng\pngpriv.h(45): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
1>pngpread.c
1>c:\wdl-ol\wdl\libpng\pngpriv.h(45): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
1>pngmem.c
1>c:\wdl-ol\wdl\libpng\pngpriv.h(45): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
1>pngget.c
1>c:\wdl-ol\wdl\libpng\pngpriv.h(45): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
1>pngerror.c
1>c:\wdl-ol\wdl\libpng\pngpriv.h(45): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
1>png.c
1>c:\wdl-ol\wdl\libpng\pngpriv.h(45): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
1>Generating Code...
1>Done building project "lice.vcxproj" -- FAILED.
2>------ Build started: Project: IPlug, Configuration: Debug Win32 ------
2>Log.cpp
2>c:\wdl-ol\wdl\iplug\containers.h(14): fatal error C1083: Cannot open include file: 'math.h': No such file or directory
2>IPopupMenu.cpp
2>c:\wdl-ol\wdl\iplug\ipopupmenu.h(4): fatal error C1083: Cannot open include file: 'math.h': No such file or directory
2>IPlugStructs.cpp
2>c:\wdl-ol\wdl\iplug\containers.h(14): fatal error C1083: Cannot open include file: 'math.h': No such file or directory
2>IPlugBase.cpp
2>c:\wdl-ol\wdl\iplug\containers.h(14): fatal error C1083: Cannot open include file: 'math.h': No such file or directory
2>IParam.cpp
2>c:\wdl-ol\wdl\iplug\containers.h(14): fatal error C1083: Cannot open include file: 'math.h': No such file or directory
2>IGraphicsWin.cpp
2>c:\wdl-ol\wdl\iplug\containers.h(14): fatal error C1083: Cannot open include file: 'math.h': No such file or directory
2>IGraphics.cpp
2>c:\wdl-ol\wdl\iplug\containers.h(14): fatal error C1083: Cannot open include file: 'math.h': No such file or directory
2>IControl.cpp
2>c:\wdl-ol\wdl\iplug\containers.h(14): fatal error C1083: Cannot open include file: 'math.h': No such file or directory
2>IBitmapMonoText.cpp
2>c:\wdl-ol\wdl\iplug\containers.h(14): fatal error C1083: Cannot open include file: 'math.h': No such file or directory
2>Hosts.cpp
2>c:\wdl-ol\wdl\iplug\hosts.h(4): fatal error C1083: Cannot open include file: 'stdlib.h': No such file or directory
2>Generating Code...
2>Done building project "IPlug.vcxproj" -- FAILED.
3>------ Build started: Project: MyFirstPlugin-app, Configuration: Debug Win32 ------
3>MyFirstPlugin.cpp
3>c:\wdl-ol\wdl\iplug\iplug_include_in_plug_hdr.h(6): fatal error C1083: Cannot open include file: 'stdio.h': No such file or directory
3>app_main.cpp
3>c:\program files (x86)\windows kits\8.1\include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
3>app_dialog.cpp
3>c:\program files (x86)\windows kits\8.1\include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
3>RtMidi.cpp
3>g:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.25017\in clude\crtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory
3>RtAudio.cpp
3>g:\program files (x86)\microsoft visual studio\2017\community\vc\tools\msvc\14.10.25017\in clude\crtdefs.h(10): fatal error C1083: Cannot open include file: 'corecrt.h': No such file or directory
3>IPlugStandalone.cpp
3>c:\wdl-ol\wdl\iplug\containers.h(14): fatal error C1083: Cannot open include file: 'math.h': No such file or directory
3>asiolist.cpp
3>c:\program files (x86)\windows kits\8.1\include\um\winnt.h(31): fatal error C1083: Cannot open include file: 'ctype.h': No such file or directory
3>asiodrivers.cpp
3>c:\wdl-ol\asio_sdk\asiodrivers.cpp(1): fatal error C1083: Cannot open include file: 'string.h': No such file or directory
3>asio.cpp
3>c:\wdl-ol\asio_sdk\asio.cpp(11): fatal error C1083: Cannot open include file: 'string.h': No such file or directory
3>Generating Code...
3>Done building project "MyFirstPlugin-app.vcxproj" -- FAILED.
========== Build: 0 succeeded, 3 failed, 0 up-to-date, 0 skipped ==========
User958303869 is offline   Reply With Quote
Old 07-12-2017, 09:28 AM   #12
pipelineaudio
Mortal
 
pipelineaudio's Avatar
 
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
Default

I get a lot of this sort of thing too

Is Martin Finke on IRC or somewhere? Or on here? I could really use some help following that tutorial
pipelineaudio is offline   Reply With Quote
Old 07-12-2017, 04:11 PM   #13
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 356
Default

I had similar issues when moving from 2015 to 2017. I can't remember exactly (and my searching through my commit log is useless), but I think it sounds like all of the needed components are not installed.

If you run the Visual Studio installer for 2017, you can add or remove components. It looks like the common C++ headers are not installed. Check out this page (https://blogs.msdn.microsoft.com/vcb...l-studio-2017/). It has some more information about the needed components for different development.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 07-12-2017, 04:27 PM   #14
pipelineaudio
Mortal
 
pipelineaudio's Avatar
 
Join Date: Jan 2006
Location: Wickenburg, Arizona
Posts: 14,047
Default

Do you know which I should remove and which I should put in to follow that blog tutorial? I thought there were other issues as well, maybe syntax wise?
pipelineaudio is offline   Reply With Quote
Old 07-12-2017, 04:40 PM   #15
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,937
Default

Is the Windows SDK Version set to an installed one in the project properties > General (eg. 10.0.15063.0 for VS 2017 on Windows 10) ?
I get similar errors about standard headers not being found when importing an old VS project (SWS). Setting a correct SDK version solves them.
cfillion is offline   Reply With Quote
Old 07-12-2017, 05:43 PM   #16
random_id
Human being with feelings
 
random_id's Avatar
 
Join Date: May 2012
Location: PA, USA
Posts: 356
Default

I use the 8.1 SDK version and v141 toolset for all of my projects. Based on that, I think I need to have the "Windows 8.1 SDK and UCRT SDK" installed in the Visual Studio Installer.

There appears to be a similar issue discussed here (https://developercommunity.visualstu...sing-c-in.html)

I wish I was more knowledgeable about this stuff (and XCode). To me, it is very confusing to know what settings to use to have the maximum compatibility. Especially for the Windows 7 and OS 10.old.old hold-outs. Every time I think I understand, VS or XCode is updated and my mind leaks out all existing information.

Edit: As cfillion said, make sure that all projects within the solution (including Lice, IPlug, etc.) have the correct and same settings for SDK and toolset. This includes Debug, Tracer, and Release configurations, and Win32 and x64 platforms.
__________________
Website: LVC-Audio
random_id is offline   Reply With Quote
Old 09-25-2017, 12:29 AM   #17
winbe
Human being with feelings
 
Join Date: May 2006
Posts: 1,361
Default

Hello all,

I am totally new to WDL-OL... I downloaded Juce and compiled a basic example with it, but then I discovered WDL-OL and think this is what I need.

Now... I thank @olilarkin as very recently things have been updated to support VS2017. I downloaded VS2017, installed Windows 8.1SDK...
tried several compilation options (I still don't know if I should target 8.1 or 10)... but...

i always have this error:

c:\perso\wdl-ol\wdl\iplug\iplugstructs.h(37): error C2589: '(': illegal token on right side of '::'

It seems it is due to the min/max functions or macros, but I am unable to solve this, I am a bit stuck... I would love to have instructions on how to use WDL-OL with VS2017 (community edition).
When placing my mouse cursor over the std::min , on the min it shows a #define ... so something is wrong.
I have seen people adding #undef min #undef max but then I have problems on other functions...

I am impatient to start to code - my goal was to follow Martin Finke famous tutorial...

Thanks everyone,
hopefully I'll soon jump in the WDL-OL wagon

Cedric Simon
__________________
Cedric Simon aka FrozenjaZz
Fresh beats - www.frozenjazz.com
winbe is offline   Reply With Quote
Old 09-25-2017, 12:33 AM   #18
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default

Planning to get rid of those in a new update. Stay tuned
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin is offline   Reply With Quote
Old 09-25-2017, 12:48 AM   #19
winbe
Human being with feelings
 
Join Date: May 2006
Posts: 1,361
Default

Thanks! What a blazing quick answer!!
I just read something about NOMINMAX

https://stackoverflow.com/questions/...ing-stdmin-max

My daily job deals with C++, but not at all under windows, and not really an advanced use, so I'll wait for your update I guess.
Do you have an estimated target date for these ?

Thanks!

EDIT: the trick of adding two #undef min #undef max worked well; I just generated the MyFirstPlugin.dll But I'd like to know how to fix this in a proper way...
__________________
Cedric Simon aka FrozenjaZz
Fresh beats - www.frozenjazz.com

Last edited by winbe; 09-25-2017 at 05:44 AM.
winbe is offline   Reply With Quote
Old 12-01-2017, 07:34 AM   #20
winbe
Human being with feelings
 
Join Date: May 2006
Posts: 1,361
Default

Hello there,
just wanted to know if something had been updated?
Thanks !
__________________
Cedric Simon aka FrozenjaZz
Fresh beats - www.frozenjazz.com
winbe is offline   Reply With Quote
Old 12-01-2017, 08:21 AM   #21
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default

update has snowballed into a total rework of IPlug. Hopefully not too long before it's ready -ish
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin is offline   Reply With Quote
Old 12-01-2017, 10:46 AM   #22
Youlean
Human being with feelings
 
Youlean's Avatar
 
Join Date: May 2015
Location: Serbia
Posts: 654
Default

Quote:
Originally Posted by olilarkin View Post
update has snowballed into a total rework of IPlug. Hopefully not too long before it's ready -ish
Can't wait to see what you came up to... 😁
__________________
Website | Facebook Page | IPlug-Youlean
Youlean is offline   Reply With Quote
Old 12-01-2017, 12:19 PM   #23
earlevel
Human being with feelings
 
Join Date: Dec 2015
Posts: 331
Default

Quote:
Originally Posted by olilarkin View Post
update has snowballed into a total rework of IPlug. Hopefully not too long before it's ready -ish
Speaking of which...in trying to solve why Studio One 3 crashes when saving a project after releasing an IPlug, I was looking at leaks. The Cocoa window is not released. That's a simple fix with autorelease, but not having much Cocoa experience, and searching to double check that my solution was the right one (it seems to be—no more leak), I happened upon ARC (Automatic Reference Counting), which seems like the smart way to go. It seems pretty trivial to update IPlug, especially since there is a migration tool, and it seems like it would avoid bugs in the future. Good idea or not?

https://developer.apple.com/library/...roduction.html
earlevel is offline   Reply With Quote
Old 12-02-2017, 03:20 AM   #24
olilarkin
Human being with feelings
 
Join Date: Apr 2009
Location: Berlin, Germany
Posts: 1,248
Default

I can't remember exactly why but I've never used a ARC for plugins, and I have a feeling there was a reason not to. I will try and get the latest studio one version three and see if I can reproduce this crash. Your fix sounds sensible
__________________
VirtualCZ | Endless Series | iPlug2 | Linkedin | Facebook
olilarkin is offline   Reply With Quote
Old 12-02-2017, 12:59 PM   #25
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 3,645
Default

I don't know much about ARC, but generally speaking you won't want to use any sort of garbage collector is the audio thread. That being said, it seems that ARC is a compile time thingy. If so, then no problem I guess. And it seems it only work for Objective-C anyway, which you probably won't use much in audio processing code.

It will likely require a newer Xcode/Clang version, which might be why this wasn't a good option a few years back, when most of us were still running Xcode 3.x/GCC.
Tale is offline   Reply With Quote
Old 12-02-2017, 03:41 PM   #26
earlevel
Human being with feelings
 
Join Date: Dec 2015
Posts: 331
Default

Yes, it looks like Xcode 4.2 and later, which is a pretty safe bet these days, especially because there are so many reasons to support C++11 at minimum.

And yes, it looks like ARC will simply put destructors (effectively) where they should otherwise be coded manually anyway, and not result in unexpected garbage collection, much less ever end up impacting the audio thread.

For now, I just put an autorelease in initWithIGraphics (IGraphicsCocoa.mm). There are a couple of other initWithFrame calls (popup menu, text entry) that may need them, but I didn't see other leaks in my own plugin that uses such things so I didn't debug further.
earlevel is offline   Reply With Quote
Old 12-11-2017, 07:10 AM   #27
winbe
Human being with feelings
 
Join Date: May 2006
Posts: 1,361
Default

Quote:
Originally Posted by olilarkin View Post
update has snowballed into a total rework of IPlug. Hopefully not too long before it's ready -ish
Thanks for the update!
__________________
Cedric Simon aka FrozenjaZz
Fresh beats - www.frozenjazz.com
winbe 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 03:05 PM.


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