Simplify sound stream code and improve the SoundSynthesis sample. Closes #257.