Fixed sample pitch and audio timings
Refactoring and changes for continuous mode