Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (623)
Games in Android Showcase (176)
games submitted by our members
Games in WIP (676)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  [Solved] Storing OGG data in a serialized object to speed up load time  (Read 40332 times)
0 Members and 1 Guest are viewing this topic.
Offline CopyableCougar4
« Posted 2014-07-26 22:51:42 »


I currently have an implementation of Slick2D's OpenAL code in my project to load sound, along with a few small classes to simplify the process of playing a sound. When the application loads, there is a loading screen where all textures are pre-loaded. I was trying to make it so this screen would also load OGG files so that when the main menu appeared, the game resources would all be 100% loaded. Before, the main menu would appear but the sole sound file was still being decoded. I timed the sound loading process, and it took a grand total of 250ms just to decode it and 500ms in the overall process using Slick2D's AudioLoader class.

Slick2D sound implementation
I took the Slick2D OpenAL code out and trimmed it down to just support OGG files.

Possible Solution
I decided that I could speed up the process by decoding the ogg files beforehand into a bytebuffer (with Slick2D decoding) and then put the data in a byte array which would be serialized in a small class that would for sure not change in the future. However, the resource still takes too long to load into OpenAL.

I was hoping someone could help me speed up the time Slick2D takes to load sound files or point out my mistakes or bad ideas so that I can get the sound loading trimmed down from 250-500ms to (ideally) 40-50ms.


Either wandering the forum or programming. Most likely the latter Smiley

Offline CopyableCougar4
« Reply #1 - Posted 2014-07-27 16:02:47 »

Well I found my error... I was being stupid and restarting the loading cycle each frame. When I tested my current solution I got OGG file loading from 250ms to 6-7ms Smiley


Either wandering the forum or programming. Most likely the latter Smiley

Pages: [1]
  ignore  |  Print  
You cannot reply to this message, because it is very, very old.

BurntPizza (12 views)
2015-10-07 02:11:23

KaiHH (13 views)
2015-10-06 20:22:20

KaiHH (11 views)
2015-10-06 19:41:59

BurntPizza (23 views)
2015-10-06 19:04:48

basil_ (44 views)
2015-09-30 17:04:40

shadowstryker (22 views)
2015-09-29 15:55:06

TheSpaceHedgehog (28 views)
2015-09-29 01:58:48

GamerC4 (54 views)
2015-09-24 21:10:38

GamerC4 (71 views)
2015-09-24 21:09:48

htuy (28 views)
2015-09-24 04:57:24
Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11

Rendering resources
by Roquen
2015-08-17 12:42:29

Rendering resources
by Roquen
2015-08-17 09:36:56

Rendering resources
by Roquen
2015-08-13 07:40:51

Networking Resources
by Roquen
2015-08-13 07:40:43

List of Learning Resources
by gouessej
2015-07-09 11:29:36 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!