Tracking Down Discontinuities in Digital Audio FX


How do you guys go about debugging your audio applications to find these issues? any suggestions?







Debugging real-time audio is hard. Depending on what information you need, the approach will be different. If you are interested in the contents of the audio buffer, you could do things like writing the content of the audio buffer to the disk (as a sequence of floats) and then to plot that content (for example, I am using gnuplot for this). However, the writing to disk itself has to be buffered; you will get dropouts if you do that directly in the audio callback.

If any of you have good techniques, I'd be interested in that as well!


A sine wave or a static DC offset as signal source maybe helps to detect discontinuities in the code.


Thanks a lot for your reply guys. Using a sine wave helped to hear and track down the issues. I'm making a simple flanger plugin, it's sounding nice now that the clicks are gone (my circular buffer was looping 1 sample early). I'm going to start looking into getting more analytical with my methods (gnuplot, matlab, octave etc..) but that might be once i get more into actual filter design and such. There is still a sort of aliasing like sound which is happening, it actually sounds quite nice as an option perhaps, but i'd like to get a very clean effect running. Any ideas if oversampling before my processing would help? i think that might be my next approach.. 


im probably nercoing this thread but

you could put a varible in that followes the previous output sample and then put if statement that checks if the previous sample is signifantly different and then add a breakpoint that jumps loop when the if statement is triggered.

A multichannel scope with triggering is also useful.