COCKOS
CONFEDERATED FORUMS
Cockos : REAPER : NINJAM : Forums
Forum Home : Register : FAQ : Members List : Search :
Old 05-04-2014, 05:12 AM   #1
antto
Human being with feelings
 
Join Date: Nov 2008
Posts: 108
Default WDL-OL - app_wrapper

i included all files from the app_wrapper subfolder to my project, and fixed the missing include dirs.. installed the asio sdk, etc..

first i had errors about undefined stuff in app_dialog.cpp
so i added "#include "app_resource.h"" to app_main.h and that seemed to have fixed it

next issue is:

line 304 in app_main.cpp
gPluginInstance->LockMutexAndProcessDoubleReplacing(inputs, outputs, gSigVS);

compiler says that IPlug has no such method
antto is offline   Reply With Quote
Old 05-04-2014, 10:26 AM   #2
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,153
Default

are you using the latest wdl-ol? Did you duplicate an example project? That's the best way to do it.
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 05-04-2014, 12:03 PM   #3
antto
Human being with feelings
 
Join Date: Nov 2008
Posts: 108
Default

can't tell what version it is, i've downloaded it somewhere around july 2013 (that's the date on the zip at least)

and yes, i simply duplicated the IPlugEffect project
antto is offline   Reply With Quote
Old 05-04-2014, 12:19 PM   #4
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,153
Default

i recommend you update to the latest version, re-duplicate an example project and bring in the important files such as the main .cpp and .h + resource.h from your old project directory.

I'm surprised the app_wrapper stuff wasn't already set up if you duplicated an example to start with.
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 05-04-2014, 01:19 PM   #5
antto
Human being with feelings
 
Join Date: Nov 2008
Posts: 108
Default

well, i just updated to the newest version
can't compile the stuff again

now i remember
when i got wdl-ol the first time (months ago) i had loads of compiler errors in the internals, and i modified some files

and now.. (mingw gcc 4.7.2)
Code:
||=== AS_SonoGx2, Release Win32 ===|
..\WDL\IPlug\IGraphicsWin.cpp|219|error: taking address of temporary [-fpermissive]|
..\WDL\IPlug\IGraphicsWin.cpp|226|error: taking address of temporary [-fpermissive]|
..\WDL\IPlug\IGraphicsWin.cpp|245|error: taking address of temporary [-fpermissive]|
..\WDL\IPlug\IGraphicsWin.cpp|265|error: taking address of temporary [-fpermissive]|
..\WDL\IPlug\IGraphicsWin.cpp|270|error: taking address of temporary [-fpermissive]|
..\WDL\IPlug\IGraphicsWin.cpp|290|error: taking address of temporary [-fpermissive]|
..\WDL\IPlug\IGraphicsWin.cpp||In member function 'virtual void* IGraphicsWin::OpenWindow(void*)':|
..\WDL\IPlug\IGraphicsWin.cpp|667|error: 'INITCOMMONCONTROLSEX' does not name a type|
..\WDL\IPlug\IGraphicsWin.cpp|669|error: 'iccex' was not declared in this scope|
..\WDL\IPlug\IGraphicsWin.cpp|669|error: 'InitCommonControlsEx' was not declared in this scope|
..\WDL\IPlug\IGraphicsWin.cpp|676|error: 'TTTOOLINFOA' has no member named 'lParam'|
..\WDL\IPlug\IGraphicsWin.cpp|676|error: 'TTTOOLINFOA' has no member named 'lParam'|
..\WDL\IPlug\IGraphicsWin.cpp||In member function 'void IGraphicsWin::SetTooltip(const char*)':|
..\WDL\IPlug\IGraphicsWin.cpp|1215|error: 'TTTOOLINFOA' has no member named 'lParam'|
..\WDL\IPlug\IGraphicsWin.cpp|1215|error: 'TTTOOLINFOA' has no member named 'lParam'|
||=== Build finished: 13 errors, 0 warnings (0 minutes, 0 seconds) ===|
antto is offline   Reply With Quote
Old 05-04-2014, 01:25 PM   #6
antto
Human being with feelings
 
Join Date: Nov 2008
Posts: 108
Default

i went to try and build the IPlugMouseTest project
same thing happens
antto is offline   Reply With Quote
Old 05-04-2014, 01:34 PM   #7
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,153
Default

its set up for msvc on windows and gcc/clang on mac. not enough hours in the day to make it work on gcc on windows
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 05-04-2014, 03:19 PM   #8
antto
Human being with feelings
 
Join Date: Nov 2008
Posts: 108
Default

i got my sonogram working again
had to change a bunch of things, mostly in IGraphicsWin.cpp

i had to also add _WIN32_IE=0x0300 to the project #defines and add libcommctl32 to the linker

so now.. to see the standalone app stuff
btw: does the standalone version of a plugin use any sound device or is it only via asio?
antto is offline   Reply With Quote
Old 05-04-2014, 03:23 PM   #9
antto
Human being with feelings
 
Join Date: Nov 2008
Posts: 108
Default

and a side question
on windows, the vst plugin made with IPlug, when active "blocks" the key presses

i am strongly tempted to try and remove that
as an example, most vst plugins i have don't block the key presses and the Host can receive them
it's annoying because i typically use my DAW's virtual keyboard, which stops working when i focus the gui of a plugin made with IPlug
antto is offline   Reply With Quote
Old 05-04-2014, 03:23 PM   #10
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,153
Default

asio or directx. If you fork WDL-OL on github i would be interested in merging your gcc fixes
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 05-04-2014, 03:27 PM   #11
antto
Human being with feelings
 
Join Date: Nov 2008
Posts: 108
Default

i tried the standalone thing again - same error as before, line 304 - no such method in class IPlug
antto is offline   Reply With Quote
Old 05-04-2014, 03:35 PM   #12
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,153
Default

ok i think i see the problem

try adding these no-ops to IPlugBase.h

Code:
  #ifdef OS_IOS
  void LockMutexAndProcessSingleReplacing(float** inputs, float** outputs, int nFrames) {};
  #else
  void LockMutexAndProcessDoubleReplacing(double** inputs, double** outputs, int nFrames) {};
  #endif
edit - or maybe you didn't define SA_API in your preprocessor defs? (try this first!)
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 05-04-2014, 04:55 PM   #13
antto
Human being with feelings
 
Join Date: Nov 2008
Posts: 108
Default

i had #defined SA_API ...

now after adding that, the next error is:
..\as_SonoGx2\app_wrapper\app_main.cpp|634|error: too many arguments to function 'IPlugVST* MakePlug()'|

and, on a side note, gcc gives this warning:
app_main.h|30|warning: extra tokens at end of #else directive [enabled by default]|
not that it affects me, just sayin'
antto is offline   Reply With Quote
Old 05-04-2014, 11:20 PM   #14
Tale
Human being with feelings
 
Tale's Avatar
 
Join Date: Jul 2008
Location: The Netherlands
Posts: 2,930
Default

Quote:
Originally Posted by antto View Post
and, on a side note, gcc gives this warning:
app_main.h|30|warning: extra tokens at end of #else directive [enabled by default]|
not that it affects me, just sayin'
Yeah, so this won't help you (sorry!), but:

Code:
#else if defined OS_OSX
Should be:

Code:
#elif defined OS_OSX
Tale is offline   Reply With Quote
Old 05-05-2014, 03:26 AM   #15
antto
Human being with feelings
 
Join Date: Nov 2008
Posts: 108
Default

fixed those warnings

now, out of boredom, i changed the problematic line to
gPluginInstance = MakePlug();
(i removed the arguments)
...to see how far it'll go next


asiodrvr.cpp, line 16
15 #if WINDOWS
16 #error do not use this
...
21 #else

huehue
i guess i should just forget about this idea
...perhaps savihost

Last edited by antto; 05-05-2014 at 03:33 AM.
antto is offline   Reply With Quote
Old 05-05-2014, 04:44 AM   #16
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,153
Default

I made a new codeblocks project for compiling the standalone app version of IPlugEffect with the latest WDL-OL. Drop it into the IPlugEffect folder

It compiles and runs, but the app doesn't appear and can't be killed from the codeblocks degbugger.

I think perhaps the WinMain() entry point function is not getting called. Got to work on my own projects now, but let me know if you figure it out!

oli
Attached Files
File Type: zip IPlugEffect-app.zip (1.6 KB, 44 views)
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 05-05-2014, 05:06 AM   #17
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,153
Default

I figured out the problem... codeblocks is not preprocessing the .rc file. Didn't work out yet how to make it do that (SA_API needs to be defined so that app_resource.h gets included in resource.h). I hacked it to make it work by copying the contents of app_resource.h into the .rc file
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 05-05-2014, 06:04 AM   #18
antto
Human being with feelings
 
Join Date: Nov 2008
Posts: 108
Default

in my case, i just added SA_API to the build options and it just worked

however, now with your cbp file, it can't find the asio headers/cpps
i've unzipped the contents of the asio_sdk zip into the \WDL\ASIO_SDK\ folder
and thus they are NOT in the main dir there

more like: \WDL\ASIO_SDK\common\asio.cpp

EDIT: also, RtAudio includes "iasiothiscallresolver.h" which.. i don't even have such file in WDL
antto is offline   Reply With Quote
Old 05-05-2014, 06:11 AM   #19
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,153
Default

follow the wdl-ol instructions (readme.txt in WDL-OL/ASIO_SDK) and using my cbp file it should work
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 05-05-2014, 06:45 AM   #20
antto
Human being with feelings
 
Join Date: Nov 2008
Posts: 108
Default

so, i should have downloaded RtAudio instead of the asio_sdk..
well, it compiles now

however, when i run the IPlugEffect.exe - it doesn't actually open any window or so, no error message, no nothing
the program itself keeps running (i see it in the task manager)
antto is offline   Reply With Quote
Old 05-05-2014, 06:51 AM   #21
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,153
Default

I figured out the problem... codeblocks is not preprocessing the .rc file. Didn't work out yet how to make it do that (SA_API needs to be defined so that app_resource.h gets included in resource.h). I hacked it to make it work by copying the contents of app_resource.h into the .rc file
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 05-05-2014, 07:22 AM   #22
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,153
Default

I'm not by my windows pc right now, but IIRC i may have also added

Code:
  #ifdef __MINGW32__
  extern "C"
  #endif
in front of

Code:
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpszCmdParam, int nShowCmd)
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 05-06-2014, 07:06 AM   #23
antto
Human being with feelings
 
Join Date: Nov 2008
Posts: 108
Default

i tried that, no difference
so the app doesn't crash or anything, it even creates a default config.ini file thing, but it just sits hidden in the background and appears to do nothing
antto is offline   Reply With Quote
Old 05-06-2014, 12:56 PM   #24
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,153
Default

i've updated the codeblocks projects on the next branch on github

https://github.com/olilarkin/wdl-ol/tree/next

hope that helps
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 05-07-2014, 05:13 AM   #25
antto
Human being with feelings
 
Join Date: Nov 2008
Posts: 108
Default

i debugged the app build to see what happens
with the debugger i reached the point where it calls CreateDialog() in app_main.cpp but the function returns NULL
then the code goes into the event loop thing, and waits there
i'll try to figure out why it returns null

EDIT: so GetLastError() says ERROR_RESOURCE_TYPE_NOT_FOUND

Last edited by antto; 05-07-2014 at 05:19 AM.
antto is offline   Reply With Quote
Old 05-07-2014, 05:24 AM   #26
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,153
Default

have you tried my latest github version? it works for me
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 05-07-2014, 06:11 AM   #27
antto
Human being with feelings
 
Join Date: Nov 2008
Posts: 108
Default

i got it working!

for some unknown reason, the #ifdef SA_API in the .rc file was not working, thus all of the dialog stuff in it was not making it thru
i commented-out the #ifdef so that it gets really added
then a few more changes i had to do:
added #include "app_wrapper/app_resource.h"
and had to change the slash char in the icon filepath: "resources/IPlugEffect.ico"

and it works now \o/
antto is offline   Reply With Quote
Old 05-07-2014, 10:28 AM   #28
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,153
Default

glad we're finally on the same page. I think it's not possible to run the c preprocessor on the .rc file in codeblocks via windres.exe. http://forums.codeblocks.org/index.php?topic=6835.0
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   Reply With Quote
Old 05-07-2014, 12:37 PM   #29
antto
Human being with feelings
 
Join Date: Nov 2008
Posts: 108
Default

and, a tiny question:
i got the FPS set to 60 or so, in the constructor
i then call the sonogram's SetDirty() from the audio process function and it was okayish.. unless the audio buffer is big

i want to redraw the sonogram all the time (60 times per second)
any tips?
antto is offline   Reply With Quote
Old 05-07-2014, 12:50 PM   #30
olilarkin
Human being with feelings
 
olilarkin's Avatar
 
Join Date: Apr 2009
Location: Huddersfield, UK
Posts: 1,153
Default

override the IControl::IsDirty() method and return true
__________________
VirtualCZ | pMix | Endless Series | iPlug2 | Linkedin | Facebook
Available for Audio Dev tuition via Skype (IPlug/JUCE/C++)
olilarkin is online now   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 02:23 PM.


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