itdelatrisu / opsu

opsu! ~ an open-source osu! client
https://itdelatrisu.github.io/opsu/
GNU General Public License v3.0
763 stars 123 forks source link

feature request / workaround for Could not start a clip errors #457

Open TT-392 opened 5 years ago

TT-392 commented 5 years ago

A lot of people seem to be having could not start clip 'nameOfClip.wav'. The most frustrating thing about this error is that you don't really notice any missing audio and the most annoying and gamebreaking part of this error seems to be the error box itsself, I know nothing about java but I just fixed the problem by commenting out the code that looked like the part where the error box appears. therefore I would like to request a feature where you can disable the error boxes or maybe just make them appear in the commandline. I know that this is not a proper fix in any way, but in this way the game is at least playable even though you might miss a sound effect every so often. This solution might also be a solution with future problems.

tpenguinltg commented 5 years ago

Thanks for the suggestion. One way to work around these errors is to disable hitsounds in the options. Obviously, this is not a good one if you really really want your hitsounds.

If we were to implement this, and I'm not sure it would be a good idea to do so, I would probably make it a config-only option, and restrict it to suppressing only audio play errors (basically a guard around the line below). https://github.com/itdelatrisu/opsu/blob/e9676f813a3d93bb87bafe9f48058e77657223c4/src/itdelatrisu/opsu/audio/SoundController.java#L313-L315

I might even suggest three values: "suppress", "don't suppress", and "notify", where "notify" pops up a UI notification that won't block gameplay. If we go this route, we should perhaps create a new function called ErrorHandler::notify that logs the error to the log file and presents a notification.