ID:164620
 
For this, Guitar Hero, game I'm adding music obviously, the problem is that, the songs dont load until you hit Start. Which starts the game. But the loading of the song throws off the time of the chords and stuff you hit. I could make a delay, but different songs have different load times, also after the song is loaded once it doesn't have a problem anymore, so there's no delay. So everything gets mixed up.

So, basically... is there anyway to load the music right when the person logs on? (Songs will be in either .mp3 format or .ogg and they don't seem to load until you hit Start even for the host, which is weird. Mp3's seem to load faster but the size is bigger when I play it.)
Use BYOND's built-in sound functionality. If a sound is referenced in code using single quotes ('), it'll get compiled into the .rsc. The .rsc is automatically preloaded by BYOND.
In response to Jon88 (#1)
I do use the built in sound, it still doesn't load it until you hit Start. So today must be my lucky day.


Anyway, I came up with an alternative. In the Login(), I made it play the songs (which is what causes them to load) and then I muted the song right after but it continues loading, and I did that before locating them on the map or even getting verbs to play. So they load all the songs before playing, it works so it'll do for now I guess :P
In response to VcentG (#2)
Another thing you could try is setting the songs to stream. There's a bitflag that turns that on. That should cause them to start playing instantly without a need to first load the entire song into memory.