Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Multi-threaded sound crashes  (Read 774 times)
0 Members and 1 Guest are viewing this topic.
Offline Stephen [NeonairGames]

JGO n00b
*

Posts: 7
Medals: 1



« on: 2012-02-07 11:47:25 »

Hello, I've been working on a danmaku shoot-em-up game using my own game engine for a while now. In my game, there are usually many bullets being fired by both the player and the enemies. So I built my sound code so using threads to handle each instance of a sound playing. This enables  multiple instances of a sound to be played at the same time.

This works completely fine for me! For one of my testers though, the game and his JRE randomly crashes when it finishes playing sounds without throwing any sort of exception. He's sent me his log file, and the problem seems to occur where I drain the remaining data from the sound's line after reading it in.

I've posted my question on Stack Overflow, with an SSCCE to demonstrate my problem. I've also provided there a log generated by my tester's JRE upon the crash  So instead of reposting it here, here's the link: http://stackoverflow.com/questions/9142967/java-multi-threaded-sound-crash

Any insight from you sound/threading gurus out there would be helpful.
Offline gouessej

JGO Kernel
*****

Posts: 3560
Medals: 30


TUER


« Reply #1 on: 2012-02-10 12:54:39 »

Maybe use Paul Lamb Sound Library if you don't succeed in using Java Sound in multi-threaded context.

Julien Gouesse
Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.124 seconds with 21 queries.