open-ephys/GUI — pull request #29 by interpretivechaos (2013-05-13 19:21:29+00:00)
Title: Removes updateParameterButtons from AudioNode 

Removed the call to updateParameterButtons from audionode, which leads
to crash when adjusting the volume on slider.

The problem is that updateParameterButtons can't be called from any
editor that doesn't use the parameterEditors array. While this can be
fixed by just removing the call from all the processors, ideally there
would be a more robust way to check if it's used. Checking if
parameterEditors.size()==0 seems to catch it some times, but other
times seems to cause a crash. I'm not sure why it doesn't work: the
constructor for Juce Arrays specifies that numUsed should be equal to
zero for an unused Array, and parameterEditors should exist for all
editors that inherit from GenericEditor. If anyone can explain where my understanding of C++ goes wrong, I'd much appreciate it.