3D Sound System

Started by paulscode, March 11, 2008, 02:38:51 AM

Previous topic - Next topic

paulscode

I noticed a weird bug in the LibraryJavaSound plug-in today, where if the source and listener have exactly the same position, the source is silent regardless of its intended volume.  This is on my PC running Linux and 64-bit Sun Java (a combination which has a multitude of other problems), so I'll verify that this is happening on "normal" computers as well when I get home this evening (if anyone wants to test this for me, try playing a source from position 0,0,0 without moving the listener, and see if you hear anything).

paulscode

I've verified that this is a 64-bit Sun Java Linux thing (works fine in other OSs and JREs).  It is really odd - everything indicates that the source is playing, but no sound.  I think maybe I'll play around with the gain controls next (maybe it's assuming incorrectly that a gain of "0" is silent instead of initial gain).

zammbi

Sounds like (no pun intended) that coding sound for Linux is quite a bucket of joy.

QuoteAdditionally, I finished the JSpeex codec plug-in.
Wow, very quick.

I did some JSpeex results on my blog: http://c-o-f.tumblr.com/

XM seems to work on software mode now. Thanks for fixing that.

paulscode

Quote from: zammbi on August 26, 2010, 05:16:47 PM
Sounds like (no pun intended) that coding sound for Linux is quite a bucket of joy.
There were two small issues with 32-bit Java, which I have addressed (the webcam bug and the lack of a default JavaSound Mixer for non-Sun Java versions like OpenJDK), but it's mainly just 64-bit Sun Java for Linux that's a total piece of crap (which is why Ubuntu for example ships with OpenJDK instead).

paulscode

Bug-Fixes Update

Sound System jPCT
Sound System

JavaSound library pluggin

WAV codec pluggin


What's New:
- 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

paulscode

CodecJorbis, Bug-Fix

Jorbis codec pluggin

- Fixed a bug where certain types of .ogg files created in versions of Audacity were cut off just before the end of the sample.

fireside

Are there any docs or tutorials for soundsystem jpct?
click here->Fireside 7 Games<-

paulscode

Quote from: fireside on November 24, 2010, 03:08:48 AMAre there any docs or tutorials for soundsystem jpct?

Yes I wrote a guide a while back with some example programs, called Guide to SoundSystemJPCT  (source for example programs)

fireside

Still not quite ready to try adding sound, but just asking, if I just use soundsystem, will it run in an unsigned applet?
click here->Fireside 7 Games<-

paulscode

Yes, you can use the core SoundSystem with LibraryJavaSound plugin and any of the codec plugins for unsigned applets

EgonOlsen

#370
Edit: Removed for now...i must have done something fishy...i get exceptions in classes that aren't there... ???

EgonOlsen

Figured it out...I had a directory called paulscode with old SoundSystem sources on the same level as src as backup. It wasn't marked as source folder nor was it part of the classpath but somehow, Eclipse figured out that it should be used instead of the sources located in the actual src-folder...no idea why, but deleting it helped. After figuring out that i now have to add libraries and codecs (haven't updated the SoundSystem for ages...), sound is back again... ;D

paulscode

Quote from: EgonOlsen on February 10, 2011, 11:24:13 PMAfter figuring out that i now have to add libraries and codecs (haven't updated the SoundSystem for ages...), sound is back again... ;D
Yes, the library has started becoming a bit bloated I think (although considerably more compatible than it was before).  I've stopped adding new features, and just plan to make bug-fixes and optimizations when needed.  I do have a new update I should get out at some point, though, which reduces the delay that used to happen when transitioning between music streams.  I'll try and get the code cleaned up and post it this weekend.

BTW, I am working on an Android version which utilizes a native mixer I wrote (requires the NDK of course).  The API is virtually the same, so it should make porting desktop jPCT games to Android a bit easier from an audio standpoint.  I haven't had a lot of time for programming lately, but hopefully I'll be able to get it out in the coming weeks.

Disastorm

#373
Hello what does this mean?

Error in class 'LibraryLWJGLOpenAL'
   Unable to open file 'sound/fx/scraping-ice-1.wav' in method 'loadSound'
Error in class 'LibraryLWJGLOpenAL'
   Sound buffer was not created for sound/fx/scraping-ice-1.wav
Error in class 'LibraryLWJGLOpenAL'
   Source 'Source_-967832717_1724366595' not found in method 'play'

That is what I get if i just initilize the SoundSystemJPCT and then try to play the sound.

If I try to initialize the SoundSystemJPCT using the SoundSystemLoader I get this error when trying to play the file:

Exception in thread "main" java.lang.NullPointerException
Error in class 'LibraryLWJGLOpenAL'
    Unable to open file 'scraping-ice-1.wav' in method 'loadSound'
        at paulscode.sound.SoundSystemJPCT.quickPlay(SoundSystemJPCT.java:1591)
        at paulscode.sound.SoundSystemJPCT.quickPlay(SoundSystemJPCT.java:1542)
        at paulscode.sound.SoundSystemJPCT.quickPlay(SoundSystemJPCT.java:1520)
        at paulscode.sound.SoundSystemJPCT.quickPlay(SoundSystemJPCT.java:1377)
        at game.sound.SoundSystem.main(SoundSystem.java:45)

which seems to be a nullpointer at some randomNumberGenerator.  How can I fix these problems??

paulscode

Quote from: Disastorm on March 25, 2011, 05:22:45 AM
Hello what does this mean?
...
    Unable to open file 'sound/fx/scraping-ice-1.wav' in method 'loadSound'
...
    Unable to open file 'scraping-ice-1.wav' in method 'loadSound'

This means it was unable to open the file.  Most likely cause is the name of the file or the folder path are misspelled.  Note that it is case sensitive (i.e. "sound" vs. "Sound"), and be sure to check if there is a missing "s" (i.e. "sound" vs. "sounds").

If you are sure the path and file names are correct, the next thing to check is if you compiled the file into the JAR (passing a name like "sound/fx/whatever.wav" will look inside the JAR for the file, not in the external containing folder).

If neither of those are the problem, please post your initialization code (any SoundSystemConfig settings and plug-ins), or the HTML file you are using for the loader.