Move all tests to outside the loop when setting volume.
Add traces to functions.

2 files changed