[FEATURE] Ability to use Raw Times (ms) instead of percentages#5
[FEATURE] Ability to use Raw Times (ms) instead of percentages#5KoloInDaCrib wants to merge 2 commits intoFunkinCrew:mainfrom
Conversation
| } | ||
|
|
||
| // on native, it will always be an ogg file, although eventually we might want to add WAV? | ||
| Assets.loadBytes(path).onComplete(function(data:openfl.utils.ByteArray) |
There was a problem hiding this comment.
This always loads the whole file. The intent of FlxPartialSound is to save memory and load times by only streaming part of the audio file. With this, you load a 3 minute audio file just to play 15 seconds of it.
There was a problem hiding this comment.
...but the function to load the future with the sound by using percentages also uses the same system - one way or another there would have to be all bytes being loaded for the partial sound, since loading bytes doesn't use cache
I've changed the system a bit to load the audio instead (which does use cache and every sound should be precached iirc) and to use that as a base instead of loading bytes again, however I'll leave this open
There was a problem hiding this comment.
Hmm, on further analysis, the original also loaded the whole file, hmmm...
This might need further review I think.
the ms-using functions are separate from the percentage ones to not break anything