Made sound functions handle improper arguments.