Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tour audio / music inconsistent start time #168

Open
astrodavid10 opened this issue Sep 7, 2020 · 6 comments
Open

Tour audio / music inconsistent start time #168

astrodavid10 opened this issue Sep 7, 2020 · 6 comments

Comments

@astrodavid10
Copy link

Audio in a tour does not always start playing at the same time (a bigger problem if trying to time time visuals precisely to audio).

@pkgw
Copy link
Contributor

pkgw commented Sep 8, 2020

Windows? Web? Both? Always, or only sometimes?

@astrodavid10
Copy link
Author

This is something that I have only noticed in the Windows client, but haven't really tested on the web. I have noticed it in the current build and previous versions as well. It occurs typically after the first time the tour is played after loading it.

Perhaps related, if a tour is previewed from a specific slide instead of pressing play, audio sometimes does not play at all.

@pkgw
Copy link
Contributor

pkgw commented Sep 11, 2020

Thanks, David. When this happens, how big of an effect are we talking — fraction of a second? Multiple seconds? Hopefully not more than that ...

@patudom
Copy link

patudom commented Sep 11, 2020

@astrodavid Does it make a difference if you are using slides in Solar System mode vs. Sky mode? @astrojonathan has helped me troubleshoot audio alignment issues with Solar System mode tours in the past, but maybe this would apply to Sky mode tours also. Basically, if I didn't have the start camera position of a slide line up perfectly in time with the end camera position of the previous slide (for example, if a few seconds had elapsed between when I generated the next slide), WWT would try to account for the time glitch in the audio. The alignment would be fine if I ran the tour from before the time glitch, but if I started the tour after the time glitch, the audio would start in a different place. It would get worse and worse as more time glitches stacked up over multiple slides. (I have never used the timeline editor, so I don't know how that would interact with all this).

@astrojonathan
Copy link
Member

I believe I have figured out what is going on, but I need to verify. There is a "Cost" function that calculates how long a slide takes to run. The music is timed to start or jump based on the accumulated run time estimate. If the estimate is off, then this might not start at the correct place. I need to carefully look at the functions CalculateRunTime() and ElapsedTimeTillTourstop in tour.cs and see if the computation is correct.

Here is where those functions live.

private TimeSpan CalculateRunTime()

@astrodavid10
Copy link
Author

@pkgw I'd say its <~0.25 sec, but I also don't think it is always the same.

@patudom I think it applies to both modes, though in the most recent case I am in SS mode. I definitely do not have the end of the previous slides lining up with the start of the subsequent slide as I am jumping between reference frames. Each slide makes use of the timeline.

@astrojonathan I am looking forward to the fix :) - no pressure haha

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants