This has been bothering me for awhile.
Windowsx64
ASIO4ALL Driver
Juce 5.4.5
ASIOAudioIODevice::Open()
Line 397 juce_win32_asio.CPP
jassert (currentCallback == nullptr); //always asserts!
My currentCallBack is valid (It is an * AudioIODeviceCallback)
Everything works as expected (::audioDeviceIOCallback, ::audioDeviceAboutToStart and ::audioDeviceStopped are called as expected).
I cannot for the life of me figure out why the assert evaluates to true?
I am sure there are persons here smarter than I am!
I am sorry but the code is within juce modules.
Specifically as I have stated:
Juce 5.4.5
ASIOAudioIODevice::Open()
Line 397 juce_win32_ASIO.cpp
jassert (currentCallback == nullptr);
Since we all have the code I assume that anyone can open juce_win32_ASIO.cpp and go to line 397.
Just in case:
Then the jassert is never hit.
::currentCallback is valid every where else in the entire file ( juce_win32_ASIO.cpp) when running as I have set a break point on every reference to it.
I am debugging under VS 2017.
I have a hard time with #define’s such as jassert as one can not really step into them.
So, I believe this is happening:
(currentCallback == nullptr) evaluates to false (currentCallback IS valid).
jassert is located in juce\modules\juce_core\system\juce_PlatformDefs.h
I am sorry if I am not getting my point across. Often times when you get an assert from JUCE, it is because of how the client code is using it. Without seeing how you are using it, it is hard to help discern if it is a user error, or something wrong with JUCE. The library tends to be pretty robust, and so we first suspect user code. Maybe this relates to an object lifetime issue? Maybe something else. Anyways, I’m glad to let this lie. Best of luck.
I have no idea why my currentCallback has a value in open() as I have not called start(). It reeks of a wild pointer. I am to the point where I am going to start re-installing things (ASIO4ALL, Juce,…) and do a clean and build.