sound buffer type consistency and code style cleanup