-
-
Notifications
You must be signed in to change notification settings - Fork 968
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
Fix: Total reset of DMusic driver once every hour #7639
Conversation
Supposedly there are issues with the MS softsynth if it plays continuously for a long time, attempt to work around this by resetting it.
Are you gonna provide a way to manually reset the DMusic driver if, for example, the automatic reset didn't work or for debugging? |
I can make the reset interval configurable, and make a console command to force a reset on next song change. |
I don't like this solution, it's far too much of a hack to fix something that isn't properly understood. It could even be a dmusic bug, rather than anything in OTTD Giving the ability to manually reset it might be an option, or perhaps just reset it in the general case when switching music sets? |
if we're seriously discussing hacks to work around problems elsewhere, maybe we could even send a reset after every song, which could work around #7637? maybe guard that with an advanced/hidden setting? |
@LordAro I agree this is hacky, but based on the problem description I can't think of a better fix. The only things that stay around between songs in the DMusic driver in OTTD are the DirectMusic objects and some integer timekeeping. The song data itself is re-read into a fresh structure every time a song is started, there isn't any way for them to suddenly partially lose data that couldn't just as well occur from the beginning. Resetting after N song changes, or after a music set change, likely do not make sense. As far as the DirectMusic library is concerned there isn't any distinction between songs, it's just a stream of note data. The music driver also doesn't care about switching music sets, it just gets instructed to play a file with no knowledge of how that file was chosen. And if the user switches songs multiple times quickly it doesn't seem to cause the issue, so it has to be based on time. @Eddi-z The problem discussed in #7637 is specific to the extmidi driver on Linux, when used with @James103 Have you been able to test whether my previous music fixes (proper GM reset before each song) have improved the situation? |
@nielsmh |
@James103 that sounds really odd, given OpenTTD/website#91 is a closed ticket. Are you sure this is blocking you? |
@nielsmh Fixed! First time I loaded website, cache gave me "20190606" (6th June 2019) for the nightly. Reloading the website (clear cache) reset the latest nightly version to "20190704" (4th July 2019). |
No, I meant that the OpenTTD website now gives the correct nightly version. The fix still needs testing. |
I'm attempting to test whether this is still required now by leaving 1.9.3 playing music through the DMusic driver overnight, if it's still working fine in the morning I'll close this as not needed. |
After having 1.9.3 play through the DMusic driver with MS softsynth for 10 hours, there are no problems with music rendition. This patch is not necessary. |
Supposedly there are issues with the MS softsynth if it plays continuously for a long time, attempt to work around this by resetting it.
See this comment by @James103 describing the problem.