Slick Forums

Discuss the Slick 2D Library
It is currently Thu May 23, 2013 10:52 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: Mon Feb 27, 2012 8:08 am 
Offline

Joined: Mon Feb 27, 2012 8:06 am
Posts: 4
After some considerable testing, I found that Ogg files under 4kb do not work (see org.newdawn.slick.openal.OggInputStream line 154).

Is this by design or just unavoidable?


Top
 Profile  
 
PostPosted: Mon Feb 27, 2012 8:55 am 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
Mh, under 4 KB... why not use a wav then? I mean it shouldn't be this big right?

_________________
Current Projects:
Image Mr. Hat I
Image Vegan Vs. Zombies
Projects:
RadicalFish Engine - Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
PostPosted: Mon Feb 27, 2012 4:27 pm 
Offline

Joined: Mon Feb 27, 2012 8:06 am
Posts: 4
I was hoping to avoid having to use both. :)


Top
 Profile  
 
PostPosted: Mon Feb 27, 2012 5:46 pm 
Offline
Game Developer
User avatar

Joined: Thu Mar 03, 2011 6:22 pm
Posts: 534
why? ogg get's converted into a raw formant anyway if you just use them as sound (hence no streaming). wav is even better for sounds since there is no need to decode it that much :D

_________________
Current Projects:
Image Mr. Hat I
Image Vegan Vs. Zombies
Projects:
RadicalFish Engine - Build on top of Slick2D, Ideas, Bugs? Open an Issue ticket!


Top
 Profile  
 
PostPosted: Mon Feb 27, 2012 5:52 pm 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1469
This is a bug with OggInputStream, also affecting LibGDX. Will look into a fix when time permits...


Top
 Profile  
 
PostPosted: Tue Feb 28, 2012 6:37 pm 
Offline
Slick Zombie

Joined: Sat Jan 27, 2007 7:10 pm
Posts: 1469
Looking into the source code, it seems to use hardcoded chunks of 4096 bytes for buffering.

I'd agree with R.D. Even when/if this bug gets fixed, using WAV is still the way to go for such small files. No audio compression, faster loading time, and a smaller filesize. There's really no benefit in using OGG.

For example, a 2.51 millisecond sound effect comes to 4,039 bytes as an OGG. The same sound effect comes to 266 bytes as a WAV.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: dissonance and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group