ivansafrin/Polycode — pull request #240 by mcclure (2013-04-15 00:17:18+00:00)
Title: Uninitialized variables breaking sound on my machine

"pitch", "volume", "reference distance" and "max distance" are all being initially set to the values of member variables of Sound -- BEFORE THOSE VARIABLES ARE ASSIGNED DEFAULT VALUES. pitch and volume are thereafter automatically assigned new values, reference distance and max distance are not. On some machines, notably mine, this can and does break all sound playback.

This patch: Gives these variables initializer values, consolidates some duplicate code, adds more error checks.