In many cases, debug assertions can be replace with exceptions in runtime code with no cost (assuming they never throw). In particular, errors can be thrown when:
[x] attempting to set an output buffer for a nonexistent oscillator (i.e., index out of bounds error)
[x] attempting to write data to a nonexistent register / RAM address (i.e., index of out bounds error)
[x] time underflow (time should never underflow in bug-free code)
This isn't useful for VCV Rack, but is useful when using the dsp code as a library in other projects. It's also more readable and clear.
In many cases, debug assertions can be replace with exceptions in runtime code with no cost (assuming they never throw). In particular, errors can be thrown when:
This isn't useful for VCV Rack, but is useful when using the
dsp
code as a library in other projects. It's also more readable and clear.