ID:260697
 
A new argument for sound() allowing it to start from a given position?

that'd be nice
AndroidData suggested some similar features before, including this. Please search before you request.
In response to Jeff8500
Ah damn. Sorry
In response to Jeff8500
The reason my request wasn't implemented is because sounds cannot be truly synchronized to an exact point, due to network lag involved.

I still believe it would be nice to have this feature, if not just to be able to specify a start & stop time of a song.

What I mean by this is that one could have a full music song which starts, loops, and then stops. It should be possible to make the song play from 0:00 up to the point of the last loop, and then make the song continue playback at whichever point the loop begins. The song would then loop endlessly without including the start & end portions of the song.
In response to Android Data
Android Data wrote:
The reason my request wasn't implemented is because sounds cannot be truly synchronized to an exact point, due to network lag involved.

I still believe it would be nice to have this feature, if not just to be able to specify a start & stop time of a song.

I second this motion

If you kept a spawn() proc that silently updates the starttime, so when other people listen to the song, they'll be synced within .5 of a second of other people

mob/proc/sync_update()
world.songsync+=5
spawn(5) world.sync_update()

mob/verb/play_synced_song()
usr << sound('song.ogg',starttime=songsync)


that would be awesome if it was added. Perhaps a way to get the length of a song as well. Something like this

var/songlength=sounddur('song.ogg')
//Play the song up to the mid-point only and loop
usr << sound('song.ogg',1,endtime=round(songlength/2))