limyz / DTXmaniaNX

A program that replicates gameplay from Konami's music video game, Gitadora - Drummania/GuitarFreaks. This project provides QoL updates, previously was forked from the DTXManiaXG verK SVN repository.
https://en.osdn.jp/projects/dtxmaniaxg-verk/
77 stars 17 forks source link

Certain keysounded Guitar/Bass charts taking too long to load #183

Open yaladre opened 2 weeks ago

yaladre commented 2 weeks ago

I've been having this issue for a while now and haven't gotten to adding it to the issues list properly until now; Basically I have certain guitar/bass charts I've made and keysounded which take way to long to load compared to other songs, however one of them works fine. I'd also like to note that guitar/bass charts いしいぬ-san has made also have the same issue, and I can't figure out why. Note that these are taking much more longer than the official GITADORA GuitarFreaks charts offered on APPROVED's website. I've included some examples to explain what I mean. The first video showcases a chart that has the loading issue, and the second video showcases a chart that doesn't have the loading issue. I'll also link downloads to both of these charts if they're of use. Note also that I keysound using Senamih-san's DTXGC Guitar cutting program to cut my keysounds. Currently, I'm using DTXMania ver. 1.5.0 in the videos, though I've also experienced this on 1.4.0. I've also attached my log if it's of any help to decipher the issue.

I'd also like to add that issue has been the primary reason I've been avoiding releasing my simfiles, as I worry people would get annoyed having to wait 2 minutes for every chart. It also makes it super painful having to wait for the chart to load when I record videos.

DTXManiaLog.txt

CHARTS DOWNLOAD: https://1drv.ms/u/s!AmME5N36RDGFvYsaOKf-tVekaDLsGw?e=DABX2J

CHART 1: https://youtu.be/h5hr8AzxPaE

CHART 2: https://youtu.be/g6hjqgfT-e8

Jumprocks1 commented 3 days ago

@yaladre

Took a quick look at this, from what I could tell from your log file, the slow part is this method being called 500+ times during loading: https://github.com/limyz/DTXmaniaNX/blob/169223512d5c98a4efb0b97bd68b4ceef57e0454/FDK/Code/03.Sound/CSound.cs#L447

That method is used to load each sample/keysound using the active sound driver. Looking at your sample charts, it seems the main difference is one uses .ogg samples whereas the other use .wav (with the .wav being the slower one). I would recommend trying to encode the samples as .ogg to see if that changes anything. It's also worth checking if all the other slow charts you have use .wav and all the fast ones use .ogg, that would help narrow down the issue. I checked a few GALAXY WAVE charts from APPROVED, and they all use .ogg, so that may be why they load faster.

You could also try a different sound driver (ASIO/WASAPI/DirectSound) since that may have a significant impact on the sound loading performance. Some comments in the code suggest DirectSound may load quicker (though I know you probably use ASIO for latency reasons).

limyz commented 3 days ago

Thanks for providing a workaround, will check with AL and see if we can do anything to fix this. Also see #60 for older .wav handling