Work in progress sound refactor

Implemented priorities, but there are still issues with the long tail
of samples with silence at the end.