0
0

There’s a way to find out how long an event lasts, but is there a way to find out how far through a playing event we are e.g. an equivalent of Channel::getPosition for events (I know it can’t be the same since an event can use multiple channels).

  • You must to post comments
0
0

We do have an internal variable that has the age of the event in seconds, is that what you would want? I can probably expose that with an Event::getTime style function.

  • You must to post comments
0
0

If you could do that, that would be great Brett. My main reason for needing this is really just to know when an event is about to finish e.g. so I can start preloading the next music when the playing music is coming to an end, but it would also be useful simply to know how much time has elapsed in some cases. The non-event code has

Channel::getPosition
Sound::getLength

with a choice of timeunits, although ms would be ideal if it’s that accurate internally.

Just a suggestion, but the easiest/best solution may be to add a "positionms" parameter to the EVENT_INFO structure, as that’s where I’m getting "lengthms" from anyway. It has "channelsplaying" and "instancesactive" so I guess that’s updated regularly/every update.

  • You must to post comments
0
0

good point i might just check it in the info structure

  • You must to post comments
0
0

I just noticed that the positionms variable still updates when the sound is paused, which obviously then leads to inaccurate timings.

  • You must to post comments
0
0

It [i:wtf4hybz]would[/i:wtf4hybz] be really useful to have positionms return the actual play position within the event, rather than just the time since it started…

  • You must to post comments
0
0

Can I bump this?

It appears that (in 00041404/Xbox360) positionms does not account for the time spent during pausing of the [i:1j21evq7]category[/i:1j21evq7] that the event is in. Is that true?

Is there a way to get an accurate position of a streaming event?

  • You must to post comments
0
0

I agree this would be handy.

In our current engine, I added an option to query the position of an event by digging into it and returning the position of the first channel I find. It’s more accurate than Event:getPosition, and we’re fortunate that the only places we need this behavior is in simple Events where the position of the first channel is the same as the position of the Event.

  • You must to post comments
0
0

we are actually making a definition between simple and complex events soon, so we will probably change positionms to just call Channel::getPosition directory for simple events so that it will be accurate.

  • You must to post comments
Showing 8 results
Your Answer

Please first to submit.