I think I’ve come across one of the strangest bugs I have ever seen, any ideas whats going on? It appeared while starting some long overdue code refactoring. I have created a class A which extends a class of mine, B. A is an AudioIODeviceCallback. A has a member of class, D which is an AudioIODeviceCallback. B has a member another class E which is an AudioIODevice callback.
So! When creating A, I register 3 objects with the AudioDeviceManager to receive callbacks (A,D and E). D is a Live input waveform display, like in the JUCE record demo. For some reason, when A is registered with the AudioDeviceManager, the waveform display (D) will work properly, but if I try to change the channel it is displaying (via a drop-down in the gui) it will not change from whatever the first channel set was to display. If I do not add A to AudioDeviceManager, it works fine and whichever channel I select in the gui displays. By chance testing some other stuff out, I added a member const float* someName and its mere presence makes it work fine (with A registered with the AudioDeviceManager)…
EDIT With that weird fix (adding a const float* as a member of the class, even though I dont do anything with it) the program destructs and quits fine, although without it, the program stalls when quitting and I get an error with the destruction of class D (waveform display ScopedPointer-- EXC_BAD_ACCESS). Not sure how adding that can fix the display problem with the waveform class and this problem upon destruction?