Server-side sound playback synchronized for clients

Something (In my opinion) that I think should be added to sound objects is the ability to synchronize the sounds for everyone if it’s played from the server, the sound should play back for everyone at the exact same position.

Example: Let’s say I’m playing music from the server at a dance club, and I want everyone to hear it at the exact same time.

I start the music, and player 1 joins the game - he hears the sound instantly.

Then, player 2 joins the game a few seconds later, and his sound loads, but he’s about 10 seconds behind the true position of the sound.

Player 3 joins a few seconds later, and she is 20 seconds behind the sound. Everyone’s sound is out of sync, and it’s annoying for everyone.

I’m not sure how hard it is to do, but a time/position object of sounds would be awesome, ie: time = 60, when a player joins, it resumes from that specific time, so everyone’s audio is in sync.

1 Like

I once joined the Pinewood Computer Core close to the explosion. 3 different song audios at once!
Alos, it has been like 8 or whatever months since they said we would get a robust sound engine.

We DO have a more robust sound engine: we never get that “omg randomly stops playing” and we definitely don’t get “doesn’t play at all when called”, and the worst was when it just… all stopped.

That’s all fixed. However, keep in mind that playing things on the server, nothing “actually” plays. The server just tells the client “play this”, and the client does.

What we really need is the ability to set the current position in the song. We could have the server store the time, and have clients request “where are we in the song”, and then set their local timer to that, and locally play. Really, I don’t think we should be able to play sounds on the server, since… well, it doesn’t make sense. However, I understand the importance of keeping this legacy code working.

We really just need a more robust API, not an engine. If they 3000% improve the engine, but the API is the same, we get no gain. We need to add things like
[ul]
[li]Position in song (read/set)[/li]
[li]Speed of playback (separate from pitch, read/set)[/li]
[li]True pitch (separate from speed, read/set, keeping old pitch behavior for backwards compat)[/li]
[li]Better volume (we can make it louder and quieter, read/set)[/li]
[li]LoadInBackground (default true, read/set, prevents it from locking up game while loading)[/li]
[/ul]

That’s all I can think of off the top of my head, but I’m sure I’ve missed a few big ones.

I’d like to see some sound analysis support here. Beat detection and such would make for lots of cool music visualization! :smiley: Though yes, song position has been a request for years. :\

Don’t forget automatically setting the .IsPlaying to false when the audio finishes.

Doesn’t work on the server since the sound is local – use the client and .IsPlaying works 100%

Doesn’t work on the server since the sound is local – use the client and .IsPlaying works 100%[/quote]

Doesn’t work for me even from a localscript and a sound in player guy

Why do people complain about IsPlaying so much, I’ve explained in only works on the client in conjunction with IsPaused multiple times, I’ve posted the code on plenty of threads too!

if IsPlaying: playing = not IsPaused else playing = false end