world << sound( "" ) // Stops any music currently playing
var/sound/S = sound( "SomeSong.mid", repeat, 0, 100, 100 ) // Sets up some song on channel 100 via var S
S.frequency = 1.2 // Sets S to play at 1.2 default speed
//S.y = 50 // Commented out; changes 3D effect
usr << S // Play the song at 1.2 times normal speed
//S.y = 0 // Commented out; restores default 3D effect, but only when the sound is updated successfully
sleep( 10 ) // Wait for just a second
S.status = SOUND_UPDATE // SHOULD update S even while it's playing; FAILS to do so. Why?
usr << S // My second attempt to update S, by playing it after setting the status to update; when this line is executed, S continues to play but the frequency seems to have multiplied by itself, becoming 1.2 * 1.2 = 1.44
usr << S.frequency // Curiously, this value is STILL equal to 1.2 although I can hear a change in the frequency. WTF?
In short, I want this verb to change the song's attributes WHILE the song is playing. The code is a bit messy because I've been playing around with it, attempting to get things to work. From experimenting, I noted another issue which struck my curiosity. The frequency (originally set to 1.2) seems to be shifted to 1.44 (or around there) after the sound update (this takes place one second after the first time the music is played), which itself seems to fail entirely. I don't understand how the frequency can so clearly sound altered, and yet the frequency output still reads 1.2 after the modifications to the sound are all said and done. To sample my problem further, please note the comments associated with the above lines of code.