I apologize for all the space I've been taking up on the forums recently, but there are several code issues I have confined to myself for some time and I realize how proficient some of you are in the DM language. =)
So I have been worked up lately by an audio issue. It seems that a song not yet loaded in the world cache (the .dyn file for the game) has slightly different attributes than a song that has been played already and loaded into the cache. I am experiencing a couple audio errors, but I will only describe the more simple of the two, as I think these errors are linked to the same root. When I play a song that has been played previously (and is still in the cache), everything works fine. It is only when a new song is played that this happens: I have a speed setting which allows the user to play a song at a range of different speeds (using sound.frequency), the problem is that a new song will always play at default (1.0) frequency, regardless of the user's speed setting. I feel this could have something to do with status = SOUND_UPDATE, which I hope some of you are familiar with. I used this line of code to update the frequency for the song, and such, and in reading the description for status --> SOUND_UPDATE in the DM Reference, I noticed that it states "If this flag is not set or no channel is specified, the sound will start again from the beginning". And that's what I believe to be happening, the song is probably starting from the beginning and at default frequency. So that leads me to believe the solution would come by setting the SOUND_UPDATE flag, or specifying a channel, but how would I do either of these two things?
Aug 21 2010, 11:49 pm