Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (577)
games submitted by our members
Games in WIP (498)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2 3 ... 8
  ignore  |  Print  
  3D Sound Engine  (Read 75006 times)
0 Members and 1 Guest are viewing this topic.
Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Posted 2009-04-12 22:12:07 »

-- This slot is reserved for the most recent working releases --

This is a 3D sound system for Java which provides a common interface to various 3rd-party sound and codec libraries.  It is free to use in any project, commercial or otherwise, and the sourcecode is included in the following links.

Downloads:

Sound System  Version date:  October 23, 2010
The core SoundSystem library, independent from 3rd-party libraries.  It is stripped down to the bare essentials, and designed to be easily customizable with various sound library and codec plug-ins.  If memory is a concern (such as in an applet) this may be a good option, because it allows you to choose as many or as few plug-ins as you require for your project.  NOTE: The core SoundSystem library without any plug-ins is only capable of playing MIDI files.  Additional plug-ins should be added for more capabilities.  The source code and license are included in the .zip file.

Sound System jPCT  Version date:  October 23, 2010
The jPCT-friendly 3D sound library.  The SoundSystemJPCT class overrides the core SoundSystem libray, and provides a number of methods to make adding 3D sound to any jPCT project easy.  It includes methods for binding Listener to Camera and Sources to Object3Ds, as well as using SimpleVector parameters.  SoundSystemJPCT utilizes the LWJGL binding of OpenAL (with JavaSound as a backup option), and the J-Ogg library for .ogg support.  NOTE: The core SoundSystem library, source code, and all relevant licenses are included in the .zip file.

SoundSystem Utils  Version date:  August 9, 2009
Includes a SoundSystem loader, and an example XML file.


Plug-ins:

JavaSound library plug-in  Version date:  October 23, 2010
Interface to the Java Sound API.  More compatable than OpenAL, but not as high quality and fewer features.  This plug-in utilizes JavaSound's panning and volume control methods to simulate an reasonable-quality 3D sound system.  Known bug: quickPlaying sounds will begin playing them at full volume for a split second, before switching to the correct volume.  This is a bug with the Java Sound API itself, and therefore beyond my control to correct.  An easy workaround is to add 0.02 seconds of silence to the beginning of each sound effect (the free Audacity sound editor works well for this).

LWJGL OpenAL library plug-in  Version date:  August 24, 2010
Interface to the LWJGL binding of OpenAL.  The LWJGL library (http://www.lwjgl.org) is required for this plug-in to work.  This library sounds much better than Java Sound, but is not as compatable.  I recommend using the JavaSound library plug-in as a backup option.  NOTE: Please read the included LWJGL license.

JOAL library plug-in  Version date:  August 29, 2011
Interface to the JOAL binding of OpenAL.  The JOAL library (http://jogamp.org) is required for this plug-in to work.  As mentioned previously, this library sounds much better than Java Sound, but is not as compatable.  I recommend using the JavaSound library plug-in as a backup option.  NOTE: Please read the included JOAL license.

WAV codec plug-in  Version date:  October 23, 2010
Adds support for .wav files.

JOgg codec plug-in  Version date:  August 24, 2010
Adds support for .ogg files using the J-Ogg library.  This codec is less compatible than the JOrbis codec, but the license is less restrictive.  Sometimes running incompatable .ogg files through a converter will make them compatable.  NOTE: Please read the included JOgg license.

JOrbis codec plug-in  Version date:  November 23, 2010
Adds support for .ogg files using the JOrbis library.  More compatible than the JOgg codec, but reads data more slowly (it may not be possible to stream more than one file simultaneously when using this codec).  This plug-in is licensed by the LGPL.  NOTE: Please read the included LGPL document.

IBXM codec plug-in  Version date:  August 24, 2010
Adds support for Protracker, Fast Tracker 2, and Scream Tracker 3 (.s2m, .mod, and .xm) files using the IBXM library.  File sizes for these formats tend to be quite small, so this may be a good option for background music.  This plug-in is based on or using the IBXM library, which is bound by the BSD License.  NOTE: Please read the included license document.

JSpeex codec plug-in  Version date:  August 24, 2010
Adds support for .ogg or .wav files encoded with Speex (a compression optimized for human voice).  See http://www.speex.org/ for more information.


Documentation:

JavaDoc  Version date:  October 23, 2010
Also includes the JavaDocs for SoundSystemJPCT and all library and codec plug-ins, and the utils library.

3D Sound with SoundSystem  PDF (download the example programs)
A tutorial-style guide to using the core SoundSystem library (last updated: April 14, 2009).

Guide to SoundSystemJPCT  PDF (download the example programs)
Another tutorial-style guide to using SoundSystemJPCT. (last updated: April 14, 2009).


Demos:

Sound Effects Player  (download the Source Code)
Demonstrates library switching on the fly, streaming background music, playing MIDI, and playing multiple sources simultaneously.  Last updated 21 August, 2010

Bullet / Target Collision  (download the Source Code)
Demonstrates the LibraryJavaSound plug-in.  Last updated 30 March, 2009

Holy Bouncing Helicopter Balls!  (download the Source Code)
Demonstrates moving through a world with multiple sources.  Last updated 21 August, 2010


What's new?

- Fixed JOAL package name from the old net.java.games.joal to the new com.jogamp.openal
- Updated CodecWav link to current version
- Improved LibraryJavaSound performance slightly in non-Sun Java versions
- Handled rare pan-control exception
- Fixed fadeOutIn bug which caused fade-in effect to be silent
- Fixed a bug where certain types of .ogg files created in versions of Audacity were cut off just before the end of the sample


We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline Hsaka
« Reply #1 - Posted 2009-04-12 23:52:35 »

Excellent! I'm trying out the jPCT Sound System library, I'll let you know how it goes.

Great work  Smiley
Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #2 - Posted 2009-04-15 05:42:56 »

Miscellaneous updates and bug fixes

The following elements have been updated:

Sound System jPCT
Sound System

JavaSound library pluggin
LWJGL OpenAL library pluggin
JOAL library pluggin

WAV codec pluggin
JOgg codec pluggin
JOrbis codec pluggin

JavaDoc
3D Sound with SoundSystem  (example programs)
Guide to SoundSystemJPCT  (example programs)


What's new?

- Finished writing the long-awaited tutorial guide for SoundSystemJPCT.
- Corrected a thread synchronization problem that caused occasional NulPointerExceptions when temporary (quickPlay) sources were bound to Object3Ds.
- Fixed a bug in the JavaSound library plug-in where ambient sources were 3D panning between left and right speaker rather than being ambient.
- Fixed a problem in bindListener where the listener did not initially match the camera until tick() was called for the first time.
- Eliminated a long pause that was being added to the end of streaming sources when using the Wav and J-Ogg codec plug-ins.


We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #3 - Posted 2009-04-21 02:56:13 »

At the request of a couple of users, I added the ability to manipulate pitch.  This is a useful feature, because making slight random pitch changes when playing sound effects can help reduce the repetitiveness and make a game's sound effects more believable.  Also, this could potentially be used to create a "Doppler effect" for moving sources.

There are two new methods in the SoundSystem class:
1  
2  
getPitch( String sourcename )
setPitch( String sourcename, float newPitch )

possible values for pitch are 0.5f - 2.0f (where 1.0f is normal pitch).  Changing the pitch also changes the playback speed.  I uploaded the updated SoundSystem core and library pluggins.  The links in my initial post are still the same.

Since there are already several people using SoundSystem in their projects, I don't want to break the existing quickPlay method by adding in a parameter for initial pitch if it isn't necessary.  The following can be used instead:
1  
soundSystem.setPitch( soundSystem.quickPlay( ... ), initialPitch );


This works fine on my computer, but if there winds up being latency problems with this method on slower machines, I will go back and change the quickPlay method.

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #4 - Posted 2009-04-28 02:28:40 »

At the request of a user, I added a new 'loadSound( String identifier, URL url )' method and uploaded the updated library.  This allows you to use a URL instance rather than specifying a String filename parameter.  The links on my original post are still the same.  Changes were applied to the SoundSystem core and all library plug-ins.  The 'String identifier' parameter must end in the file's extension (example "whatever.ogg"), so SoundSystem knows what codec to use when reading from the URL.  This identifier can be used for the 'String filename' parameter in the newSource and quickPlay methods.

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline GameCodingNinja

Senior Newbie





« Reply #5 - Posted 2009-07-17 19:49:26 »

I have your "Sound System" running. Works great and real easy to use.

For my needs, I'll just stay with Java Sound playing wav files. Sounds good to me and I don't need anything too fancy.

Thanks for the hard work!
Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #6 - Posted 2009-08-06 02:54:28 »

Today I finished a major update to the SoundSystem.  I wrote a new class to make switching between String filename/identifier and URL on the fly very easy.  I worked it into all the streaming methods and the MIDI channel stuff (as well as reworking the loadSound method to use this new setup), so now either URLs or filenames can be used with all types of sources (MIDI, normal, and streaming).  Everything seems to be working after running several quick tests.  However, since the change was rather extensive (I ended up editing almost every class), I need to spend some time doing more extreme testing to make sure the library is still stable and all features work.  I also have a couple more small additions I want to add before the next release.

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #7 - Posted 2009-08-08 19:42:16 »

Sound System, Cumulative Updates/Bug-Fixes

Sound System
Sound System jPCT
Sound System Utils

JavaSound library pluggin
LWJGL OpenAL library pluggin
JOAL library pluggin

JOrbis codec pluggin

-Made it so initializing OpenAL plug-ins will notify when AL_PITCH is not supported
-Fixed vorbis-header compatability issue with OGG files generated by Audacity
-Improved error-handling in multiple classes
-Updated and added multiple classes to allow user to specify either String filenames or URL instances
-Added new class to associate filename/identifier with URL
-Improved MIDIChannel class - searches for alternate sequencer/synthesizer if defaults don't work
-Added a new method for feeding raw audio data directly to a channel through streaming sources
-Added a new source-creation method to produce streams that can be fed directly with raw audio data
-Added a new SoundSystemUtils library which includes an XML loader
-Corrected problem in LibraryJavaSound plug-in where sources would only play once
-Corrected channel-source association bug which caused rare odd behaviors


We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #8 - Posted 2009-08-09 11:50:56 »

Something I changed seems to have broken Command synchronization.  I am currently looking into the problem, so please stand by.

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #9 - Posted 2009-08-09 20:44:27 »

Ok, I solved the problem.  This logic error has actually been in the code for a very long time, but it never manafested itself until now.  I had to change the CommanQueue/ManageSources infrastructure to correct it, so any legacy code that extends the SoundSystem class for customized source management models will most likely now be broken.  If this causes problems for anyone, please refer to the JavaDoc for the proper new way to do custom source management, or post questions here for help.  Sorry any inconvenience this causes.

Updated packages:
Sound System
Sound System jPCT
Sound System Utils

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #10 - Posted 2009-08-10 04:51:52 »

I fixed one more minor bug - a looping MIDI source without any sequences its play queue wasn't looping.  I went ahead and uploaded the fixed JAR and sourcecode (only the SoundSystem core was affected by the change).

Also, I finished my new and improved Helicopter Balls applet (taking the silliness to a whole new level):

Helicopter Balls Applet

And if you want the source code (not sure why anyone would):

Helicopter Balls Source

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline elias4444

Junior Member





« Reply #11 - Posted 2009-08-10 05:07:04 »

The new helicopter applet looks great... but you should know it has the infamous Mac bug (that you get from not setting up the applet "correctly").  Wink

Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #12 - Posted 2009-08-10 12:27:14 »

Never heard of that before.  How does one set up an applet correctly?

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline ImNotBacon

Junior Member




Don't eat me


« Reply #13 - Posted 2009-10-12 17:37:12 »

Great engine! I retrofitted my game with it in under an hour.

Maybe I didn't see it while scanning the documentation at turbo speed, but I couldn't figure out where to place the sounds in my jar until I looked at how your helicopter demo was built.
Offline Jono
« Reply #14 - Posted 2009-10-13 09:51:25 »

Another plugin that would be nice would be one for the IBXM library (for .mod files).

It's a library and player released under LGPL here and apparently under BSD license here.

Edit: I just noticed there's a sunet2000 user on java-gaming.org, and they list their website as IBXM. Small world.
Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #15 - Posted 2009-10-14 00:36:55 »

Another plugin that would be nice would be one for the IBXM library (for .mod files).

It's a library and player released under LGPL here and apparently under BSD license here.

I thought I would look into that IBXM library, but I'm having a little trouble finding where to download the actual source code.  The first site you listed has no downloads at all that I can see, and the second one you listed (which is linked to by the first one, BTW) only has a link to download the compiled JAR but no source code.  I am little confused, not only by the fact that the project is listed under two different licenses, but also because both of those licenses are supposedly "Open Source" licenses, which should mean the source code is available to download from somewhere..  If you happen to know where I can get my hands on the source, let me know.  In the mean time, I'll keep digging around to see if I can find it.  I suppose I could write an IBXM plug-in that requires that external JAR, but I would prefer to drop the source into my JAR to make things a bit easier for the user.

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline Jono
« Reply #16 - Posted 2009-10-14 02:16:08 »

The jar contains both source and class files. There may need to be some tweaking of the source (I think it tries to grab source data line thingies directly for playback), but if it's available under BSD license I suppose that's no big deal.
Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #17 - Posted 2009-10-14 02:20:07 »

The jar contains both source and class files.
So it does.  I'll look into it, and keep you posted.

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #18 - Posted 2009-10-14 06:12:15 »

I finished writing a codec plug-in based on the IBXM library.  I haven't had time to test it very extensively yet, but the IBXM library is quite intuitive so I don't forsee any problems.  Let me know if something doesn't work properly.

IBXM codec plug-in  Version date:  October 13, 2009
Adds support for Protracker, Fast Tracker 2, and Scream Tracker 3 (.s2m, .mod, and .xm) files using the IBXM library.  File sizes for these formats tend to be quite small, so this may be a good option for background music.  This plug-in is based on or using the IBXM library, which is bound by the BSD License.  NOTE: Please read the included license document.

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline Jono
« Reply #19 - Posted 2009-10-14 21:47:49 »

That's some fast work  Grin

The mod files sit nicely between ogg and midi in the quality/size spectrum. Perfect for keeping applet sizes down. Thanks heaps.
Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #20 - Posted 2009-11-06 00:13:25 »

Minor bug fixes Update

I haven't updated the JavaDoc yet - there seems to be a bug in NetBeans that is preventing me from producing any JavaDocs, and I haven't had time to search for a fix.

Updated packages:
Sound System
Sound System jPCT


- Corrected a problem in the SoundSystemJPCT extension where source creation methods requiring a String filename parameter stopped working after a previous core library update.
- Added additional methods that take URL file references.
- Simplified thread synchronization in the core library, making it easy for users to manually manipulate sources by synchronizing on SoundSystemConfig.THREAD_SYNC object.
- Fixed a potential deadlock caused by overly-complicated thread synchronization infrastructure in core library.

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline elias4444

Junior Member





« Reply #21 - Posted 2009-11-06 00:40:09 »

Paul, I'm really impressed with your dedication to your sound engine. Keep up the good work! I may be using it for all sound soon in my own game engine.

Offline Eli Delventhal

JGO Kernel


Medals: 42
Projects: 12


Game Engineer


« Reply #22 - Posted 2010-01-05 18:38:22 »

This is pretty damn beauteous. I wasn't aware of this until I saw another post linking this way. I will definitely be using this in my future projects.

See my work:
OTC Software
Offline jojoh

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #23 - Posted 2010-01-06 13:42:15 »

Looks interesting, but my initial tests indicates that the fallback to "software mode" isn't quite working:

1  
2  
3  
Starting up SoundSystemJPCT...
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
...

From:
1  
2  
   SoundSystemJPCT soundSystem = new SoundSystemJPCT();
   soundSystem.quickPlay("sound.wav", false);

Offline Hansdampf

Senior Member


Projects: 3


too offending?


« Reply #24 - Posted 2010-01-06 15:33:30 »

I get this error in the SoundSystemPlayerApplet (no sounds/music for me)

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
Starting up SoundSystem...
Initializing Java Sound
    (The Java Sound API.  For more information, see http://java.sun.com/products/java-media/sound/)
JavaSound initialized.

Exception in thread "Thread-15" java.lang.InterruptedException: sleep interrupted
   at java.lang.Thread.sleep(Native Method)
   at com.sun.media.sound.AbstractPlayer.nClose(Native Method)
   at com.sun.media.sound.AbstractPlayer.implClose(Unknown Source)
   at com.sun.media.sound.MixerSynth.implClose(Unknown Source)
   at com.sun.media.sound.AbstractMidiDevice.doClose(Unknown Source)
   at com.sun.media.sound.AbstractMidiDevice.close(Unknown Source)
   at javax.sound.midi.MidiSystem.getSequencer(Unknown Source)
   at javax.sound.midi.MidiSystem.getSequencer(Unknown Source)
   at paulscode.sound.MidiChannel.getSequencer(MidiChannel.java:1177)
   at paulscode.sound.MidiChannel.init(MidiChannel.java:268)
   at paulscode.sound.MidiChannel.<init>(MidiChannel.java:256)
   at paulscode.sound.Library.loadMidi(Library.java:1284)
   at paulscode.sound.SoundSystem.CommandNewSource(SoundSystem.java:1691)
   at paulscode.sound.SoundSystem.CommandQueue(SoundSystem.java:2226)
   at paulscode.sound.CommandThread.run(CommandThread.java:121)

Switching to LWJGL OpenAL
    (The LWJGL binding of OpenAL.  For more information, see http://www.lwjgl.org)
OpenAL initialized.

lots of sillystupid games: http://www.emaggame.com
Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #25 - Posted 2010-01-06 15:42:21 »

Looks interesting, but my initial tests indicates that the fallback to "software mode" isn't quite working:

1  
2  
3  
Starting up SoundSystemJPCT...
Exception in thread "Thread-0" java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
...

From:
1  
2  
   SoundSystemJPCT soundSystem = new SoundSystemJPCT();
   soundSystem.quickPlay("sound.wav", false);


This message indicates that you are not linking with the LWJGL.  You can download it from http://www.lwjgl.org.  Also, if this is for an application, make sure to use the proper natives for LWJGL.

In SoundSystemJPCT, the zero-parameter constructor does automatic compatibility checking for LWJGL OpenAL first, and then Javasound, so you must link with LWJGL to use this constructor.  If you know you will not be using LWJGL, then use the second constructor in which you specify the library plug-in to use (i.e. LibraryJavaSound.class for "software mode").

--EDIT--
Hansdapf, I am looking into you problem, and I'll post a fix after I figure out what is causing it.

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline jojoh

JGO Knight


Medals: 5
Projects: 7


games4j.com


« Reply #26 - Posted 2010-01-07 11:26:04 »

This message indicates that you are not linking with the LWJGL.  You can download it from http://www.lwjgl.org.  Also, if this is for an application, make sure to use the proper natives for LWJGL.

From the PDF:
Quote
SoundSystemJPCT will automatically try to load LWJGL OpenAL “hardware mode”,
and if that fails, it will switch to JavaSound “software mode”.
I thought that meant that if lwjgl was available it will use it otherwise java sound, but what it really means, is that if no hardware accelerated sound is available for OpenAL it will fallback to java sound?

Also, the example applet has crashed (or shut down) my entire collection of browsers twice. Is there a Systems.exit() somewhere in the code? If so, it should probably be skipped for applet versions! Was thinking about using it in applets, so this is quite important to me, whatever the reason was that it was shut down.

I wanted to use this to be able to change the sample rate on sounds. With java Clip I get:
clip.isControlSupported(FloatControl.Type.SAMPLE_RATE) == false
I am not sure what makes it impossible to change sample rate, but I guess it is hardware related. Do you know if I would be able to change the sample rate with this tool using OpenAL in lwjgl on the same rig?

What is the smallest footprint one can get away with for an applet? Currently my applet <300k and I wouldn't want to multiply the dl size too many times just to play a soundclip at different frequency.

Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #27 - Posted 2010-01-07 15:51:11 »

From the PDF:I thought that meant that if lwjgl was available it will use it otherwise java sound, but what it really means, is that if no hardware accelerated sound is available for OpenAL it will fallback to java sound?
Currently, the compatibility checking for both OpenAL plug-ins check if OpenAL is able to work on the user's machine - it assumes you as the developer have linked your program with the proper external library.  I suppose I could change this, if I can determine an elegant way to detect if the developer has linked with the LWJGL library or not.  It just seems obvious to me that if you as the developer know that you are not linking with the LWJGL library, then why would you need to run the compatibility check for the LWJGL OpenAL plug-in anyway?  It would always be incompatible in that case.

Also, the example applet has crashed (or shut down) my entire collection of browsers twice. Is there a Systems.exit() somewhere in the code? If so, it should probably be skipped for applet versions! Was thinking about using it in applets, so this is quite important to me, whatever the reason was that it was shut down.
There is no Systems.exit() called anywhere in the code.  Which library plug-in are you using when the problem occurs?  I have heard about this happening when using the OpenAL plug-ins, and I have assumed that it is because you are linking with an external native library which requires you to disconnect when you are finished with it.  There is a SoundSystem.cleanup() method that you should always call in your program when you are finished with the SoundSystem, to properly shut down OpenAL .  However, if your problem is happening when using the JavaSound plug-in, then that would be a new bug.  Just let me know if that's the case, and I'll look into it.
 
I wanted to use this to be able to change the sample rate on sounds. With java Clip I get:
clip.isControlSupported(FloatControl.Type.SAMPLE_RATE) == false
I am not sure what makes it impossible to change sample rate, but I guess it is hardware related. Do you know if I would be able to change the sample rate with this tool using OpenAL in lwjgl on the same rig?
I don't know, but I can look into it.

What is the smallest footprint one can get away with for an applet? Currently my applet <300k and I wouldn't want to multiply the dl size too many times just to play a soundclip at different frequency.
A smaller footprint would be to use the core SoundSystem library linked with the specific plug-ins that you need (for example LibrayJavaSound and CodecJOgg), rather than using the full SoundSystemJPCT extension.  The truly smallest footprint would be to copy and paste only the parts of code that you need, which you are allowed to do with the very libral license that I put on the library.  It just depends on your needs and how much effort you want to put into it.  SoundSystemJPCT is easiest option if you are using it in a jPCT project, but it also has the largest footprint.

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Offline Hansdampf

Senior Member


Projects: 3


too offending?


« Reply #28 - Posted 2010-01-08 13:54:44 »

I get this error in the SoundSystemPlayerApplet (no sounds/music for me)
...
Now it works fine Smiley

edit: now it does not work. Same error. You should start a new VM each time I guess.

lots of sillystupid games: http://www.emaggame.com
Offline paulscode

Senior Member


Medals: 11


Staff Sergeant


« Reply #29 - Posted 2010-01-08 19:26:09 »

This is really strange.  It seems from your output, that calling MidiSystem.getSequencer();, an InterruptedException is being thrown.  This looks to be a thread synchronization problem related to the Command Thread infrastructure.  The only place I can see that I am telling that thread to sleep, though, is from inside its run() method after processeng all the commands.  I can't figure out how it us being put to sleep somewhere between when the command began processing and when the call to MidiSystem.getSequencer() was called.

I suppose a second possibility here is that the InterruptedException happened on a different thread, and Java Sound is just forwarding that message back to the user rather than ignoring it.

Let me write some smaller test programs when I have a little time.  I'll have you run them and hopefully pinpoint where the problem is comming from.

We love death.  The US loves life.  That is the difference between us.  -Osama bin Laden, mass murderer
Pages: [1] 2 3 ... 8
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (25 views)
2014-04-15 18:08:23

BurntPizza (20 views)
2014-04-15 03:46:01

UprightPath (36 views)
2014-04-14 17:39:50

UprightPath (18 views)
2014-04-14 17:35:47

Porlus (34 views)
2014-04-14 15:48:38

tom_mai78101 (60 views)
2014-04-10 04:04:31

BurntPizza (118 views)
2014-04-08 23:06:04

tom_mai78101 (218 views)
2014-04-05 13:34:39

trollwarrior1 (185 views)
2014-04-04 12:06:45

CJLetsGame (192 views)
2014-04-01 02:16:10
List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
java-gaming.org 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‑gaming.org
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!