Hi !
Featured games (84)
games approved by the League of Dukes
Games in Showcase (595)
Games in Android Showcase (169)
games submitted by our members
Games in WIP (647)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / Java Sound & OpenAL / Re: Need a really simple library for playing sounds and music? Try TinySound. on: 2012-03-15 10:38:02
Wow, that's a really useful tool. Thanks!  Cool
2  Java Game APIs & Engines / Java Sound & OpenAL / Re: Need a really simple library for playing sounds and music? Try TinySound. on: 2012-03-14 19:54:30
  It would also help a lot if I could get a copy of your audio file for testing, but since it's an asset I understand if that isn't possible.

No probs at all. It was just a random .wav file that I downloaded to test drive the library. Grab it here

Hope it helps Smiley
3  Java Game APIs & Engines / Java Sound & OpenAL / Re: Need a really simple library for playing sounds and music? Try TinySound. on: 2012-03-14 15:20:08
Thanks for sharing this. I love the simplicity.

Just a quick nooby question if I may. I'm just working on sound for my first game, and decided to use your library to make things easier. However I keep getting the following exception when I attempt to load a new sound. Here's the callstack:

Exception in thread "Thread-4" java.lang.NegativeArraySizeException
   at kuusisto.tinysound.TinySound.readAllBytesTwoChannel(
   at kuusisto.tinysound.TinySound.readAllBytes(
   at kuusisto.tinysound.TinySound.loadSound(
   at kuusisto.tinysound.TinySound.loadSound(
   at brickout6.Game.LoadContent(
   at brickout6.Game.access$100(
   at brickout6.Game$

and the code fragment it fails at:

private static byte[][] readAllBytesTwoChannel(AudioInputStream stream) {
      //read all the bytes (assuming 16-bit, 2-channel)
      int numBytesPerChannel = (int)stream.getFrameLength() *
         (stream.getFormat().getFrameSize() / 2);
      byte[] left = new byte[numBytesPerChannel];

Now, I get that a NegativeArraySizeException is telling me that numBytesPerChannel is returning an invalid array index. but I'm not quite sure why I should be getting it in this case? Checking the code, it performs multiple data validity/null checks on the loaded file prior to reaching this line so if there was something wrong with say, the path to the file, or the integrity of the file, surely this would be flagged sooner by the built-in error handling?

Sorry for the nooby question as I'm very much a beginner at all this. Any idea what's going on here?
Pages: [1]
KaiHH (15 views)
2015-07-07 11:39:58

deepthought (54 views)
2015-06-30 15:39:44

deepthought (57 views)
2015-06-30 15:39:09

deepthought (66 views)
2015-06-30 15:36:52

Za\'Anzabar (44 views)
2015-06-29 05:44:54

TritonDreyja (50 views)
2015-06-24 17:10:40

CopyableCougar4 (52 views)
2015-06-23 00:34:45

BurntPizza (58 views)
2015-06-21 20:36:46

cookiecompiler (100 views)
2015-06-11 15:42:53

cookiecompiler (58 views)
2015-06-11 15:41:14
How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14 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!