![]() ![]() ![]() Really depends on CPU speed versus storage speed. I think it's inevitable compressed formats will potentially take longer to load. If I were in charge, I'd have been likely to close this issue with the reasoning of "of course OGGs load more slowly than WAVs", but now I'm thinking this raises the point that libGDX's desktop audio decoding speed could be improved upon, so it could be worth leaving open for that alone. While I'm not surprised the compressed formats take longer, being ~3× slower suggests something suboptimal is going on here in libGDX land. ![]() ![]() Some of the above codecs can be used on mobile and web, and I hope will be supported on desktop one day. Tested on libGDX 1.10.0 with Java 11 and LWJG元. The source file used was the 2010 remaster of Supertramp's Breakfast in America album, ripped from CD - 46m19s in length, and unsurprisingly 16-bit stereo 44.1kHz.Īll test files are 128kbps (☑kbps) with the exception of HE-AAC (64kbps) and of course (AD)PCM and FLAC. While blatantly ignoring the fact sound effects will be lots of small files (which will be slower than loading one large file) it gives us an idea for what kind of difference is realistic. This isn't super scientific, but I've tested the decode times of various codecs on my computer with ffmpeg. I wanted to see if there's anything more behind this issue, and I kind of lost track of what direction I was going in with this comment. In my own use of LibGDX audio I noticed it is probably the weakest part of the framework so it is possible there is a problem. Yes I'm sure the slowdown is due to conversion of the compressed ogg and mp3 formats. wav is a very high-quality, high-file-size format, converting may have had the tool attempt to preserve that high quality, leading to larger amounts of data that needs to be processed during loading. The times I gave above are total game load time. I'm guessing it can't be that much of an issue otherwise there would be more people talking about it since it's increasing my TOTAL load time, including loading all textures etc by FIVE times. I couldn't find much about people talking about slow loading times of ogg or mp3 sounds in game dev. The files are all 10 - 100k each in ogg format with most under 50k. There are 49 sound files but as I say, I don't think it makes a difference since I'm comparing the same amount of files with wav. I think if it was a hard drive issue it wouldn't effect only ogg and not wav, it's certainly an importing issue. I hope someone else can chime in who uses audio more heavily. There may be some better choices when converting offered by other tools I've used Audacity a little, and it always worked fine. ogg may have used a very high bitrate when you might only need a lower one. Audio has bitrate as a configuration option, and whatever tool you used to convert the. ogg is like other similar file formats, there are probably levels of compression you can use with the files, as well as maybe degrees of lossiness. I have to emphasize I have not done much of anything with libGDX audio, or audio in other platforms, but if. ogg files that might help us understand what's going on. You haven't said how many files you're loading, or the file sizes of the. There are numerous possible reasons for slow loading, in particular hard disk drives being slower to read from in general than flash media (like solid state drives or phone storage), or some file systems slowing down in folders with many files. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |