Yes, I'm suggesting this again. Mainly because now I have a way to make sure the sounds are sent before I play them (so I know the only lag will be the lag between the command issued to send the sound and the client playing it, which should be minimal).
I'd like to opt for an index variable for the /sound datum. Simply put, it can be set to the amount of ticks in the song.
Example: I have a song which is 2 minutes and 30 seconds long. (600*2)+300 = 1500
I'm using a special jukebox object to play the song to those in view. What I want to do is maintain the current duration of the song (I'm already doing this to show how much time is left on the song and to stop the song when it's finished, and it's working seamlessly cause' you can't login till' you've downloaded the song, preventing lag during downloading of the song). I want it so when a player goes within range of the jukebox and isn't already hearing the song, it will play the song to the player on aprox. the same time the other players are hearing the song. Except, I can't do this.
This is why I want the index variable: it will play the song on the specified index. If SOUND_UPDATE is set, it will move the song to the specified index. If it's not set, it will only take effect if the song isn't already playing.
This way, I can have the player go out of range and stop the song, and when the player comes back into range the song will play where it has left off. I know it may not be precise due to the lag mentioned in the previous suggestion I made for this, but if it's the best I can get I'll gladly accept it.
Please heavily consider this.
ID:260308
![]() Feb 19 2007, 12:55 am
|
|
Lummox JR wrote:
It doesn't make any sense to call it an index, then. Oh. Perhaps "length" or something? No indeed, you can't. It's completely unworkable with any feature set, because you can't sync players to that kind of degree. The communication involved would be totally infeasible. Hence why I said "aprox.": I want the sound to be put at ABOUT the same time as the other players are. I can see a little logic in that, but only somewhat. Mostly it makes sense only to fade the volume in and out but let the song keep playing. Starting it in such a way as to sync with other players is pointless, but making it sync up to a single player (as best it can) isn't so bad. But for that, you don't need an index anyway. That's what I meant. |
It doesn't make any sense to call it an index, then.
No indeed, you can't. It's completely unworkable with any feature set, because you can't sync players to that kind of degree. The communication involved would be totally infeasible.
I can see a little logic in that, but only somewhat. Mostly it makes sense only to fade the volume in and out but let the song keep playing. Starting it in such a way as to sync with other players is pointless, but making it sync up to a single player (as best it can) isn't so bad. But for that, you don't need an index anyway.
Lummox JR