Author Topic: Sounds stop playing after 28 played  (Read 3075 times)

Offline emile

  • bit
  • Posts: 2
    • View Profile
Sounds stop playing after 28 played
« on: December 13, 2011, 10:42:35 PM »
Hi,

I'm developing a game on Slick with the SoundSystem and for some reason my sounds stop playing after 28 sounds have played.
 These are the plugins I use :
try {
            SoundSystemConfig.addLibrary( LibraryJavaSound.class );
        } catch (SoundSystemException ex) {
            Logger.getLogger(Niveau.class.getName()).log(Level.SEVERE, null, ex);
        }
        try {
            SoundSystemConfig.setCodec( "wav", CodecWav.class );
        } catch (SoundSystemException ex) {
            Logger.getLogger(Niveau.class.getName()).log(Level.SEVERE, null, ex);
        }
}

I only use soundSystem.quickplay() in this manner :
niveau.getMySoundSystem().
                                        quickPlay( true, "bouclier1.wav", false,
                                             0, 0, 0,
                                             SoundSystemConfig.ATTENUATION_NONE,
                                             SoundSystemConfig.getDefaultRolloff()
                            );

At first I wasnt removing the temporary sources and so I thought this was the problem, so
 during game updates I wrote  this : niveau.getMySoundSystem().removeTemporarySources();
But still the sounds stop after 28 play.

Does anyone have any idea as to what could be causing this ?

As I said, my first 28 sounds play like a charm.


Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Sounds stop playing after 28 played
« Reply #1 on: December 13, 2011, 11:11:52 PM »
You don't have to remove the temporary sources, because they are removed automatically after they finish playing.  That is definitely not the cause of your problem.  I'll put together a more verbose test for you to run when I have some time.  I suspect it is an issue with the chosen Mixer (Oracle has royally screwed up Java Sound in recent builds, especially on Linux, but every OS was affected by their decision to eliminate the default Java Sound Audio Engine mixer).  It may be a matter of figuring out if there is a better mixer on your system you can use.  The LibraryJavaSound plug-in used to be awesome, but it has become pretty much useless until I finish writing my own software mixer (I've been busy with my main project, so this one has taken a back burner recently).  You might want to consider using the LibraryJOAL or LibraryLWJGLOpenAL plug-ins if you don't mind your project JARs needing to be signed to distribute them.
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted

Offline emile

  • bit
  • Posts: 2
    • View Profile
Re: Sounds stop playing after 28 played
« Reply #2 on: December 14, 2011, 02:16:24 AM »
Sir, you are my savior.

Thank you so much.


(It took me a while to figure out that my slick distribution could only recognize OpenAL with lwjgl 2.4, or there's something I dont get... anyways it WORKS! thanks to you I have a neat little game I can present this friday in my comp class)


Offline Paul

  • Administrator
  • double
  • *****
  • Posts: 3496
  • Developer
    • View Profile
    • PaulsCode.Com
Re: Sounds stop playing after 28 played
« Reply #3 on: December 14, 2011, 04:33:55 AM »
I actually haven't looked at recent builds of LWJGL, so it's likely they changed something in the API that broke the LibraryLWJGLOpenAL plug-in (that happened recently to the LibraryJOAL plug-in and I didn't know about it until someone pointed it out).  Thanks for letting me know!  I'll try and get together a couple tests for you to run in the next couple days (there is another bug that I want to fix first with stream looping in both the AL plug-ins when the speed hack is enabled).  I want to make sure that it was a Mixer problem you had with LibraryJavaSound (although I'm 99% sure it was).  I'm glad you are able to do your presentation on time (those are always a lot of fun).
Device: Samsung Galaxy Nexus i515
CPU: TI OMAP4460, 1.2 GHz (dual core, ARM Cortex-A9)
GPU: PowerVR SGX540, 307 MHz
RAM: 1 GB
Resolution: 720 x 1280
Rom: omni-4.4.4-20141014-toro-FML KitKat 4.4.4, rooted

Device: Eee PC 1015PEM
CPU: Intel Atom N550, 1.5 GHz (dual core, x86)
GPU: Intel GMA 3150, 200 MHz (dual core)
RAM: 2GB
Resolution: 1024 x 600
Rom: android-x86-4.3-20130725 Jelly Bean 4.3, rooted