Fixes the following two errors I spotted using valgrind:
When deleting a channel;
==936== Invalid read of size 8
==936== at 0x56FA1D: FxMixerView::deleteChannel(int) (FxMixerView.cpp:374)
==936== by 0x60E9A79: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==936== by 0x5216BF1: QAction::triggered(bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==936== by 0x52185C2: QAction::activate(QAction::ActionEvent) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
==936== Address 0x14d51b90 is 32 bytes inside a block of size 40 free'd
==936== at 0x4C2C2E0: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==936== by 0x56F9ED: FxMixerView::deleteChannel(int) (FxMixerView.cpp:370)
==936== by 0x60E9A79: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==936== by 0x5216BF1: QAction::triggered(bool) (in /usr/lib/x86_64-linux-gnu/libQtGui.so.4.8.6)
When loading a new project after adding some channels:
==936== Invalid read of size 8
==936== at 0x570785: FxMixerView::refreshDisplay() (FxMixerView.cpp:202)
==936== by 0x4B590E: Song::clearProject() (Song.cpp:740)
==936== by 0x4B7885: Song::createNewProject() (Song.cpp:817)
==936== by 0x60E9A79: QMetaObject::activate(QObject*, QMetaObject const*, int, void**) (in /usr/lib/x86_64-linux-gnu/libQtCore.so.4.8.6)
==936== Address 0x56a12ab0 is 32 bytes inside a block of size 40 free'd
==936== at 0x4C2C2E0: operator delete(void*) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==936== by 0x57075B: FxMixerView::refreshDisplay() (FxMixerView.cpp:201)
==936== by 0x4B590E: Song::clearProject() (Song.cpp:740)
==936== by 0x4B7885: Song::createNewProject() (Song.cpp:817)
Constants:
- calculate all in long double so as to improve the accuracy of our pre-calculated constants
- add some possibly useful constants: reciprocal of pi, square of pi, and reciprocal of e
Math:
- new math convenience functions: absMax, absMin
The snare sounds like it would be used for marching. If you can make it
brighter without making it sound funny, please do...
The kick was too dark for general purpose. Shortened it, raised it in
the frequency range and added more noise.