Author Topic: 3D Sound System  (Read 296460 times)

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #360 on: August 25, 2010, 11:36:07 am »
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).

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #361 on: August 25, 2010, 11:31:45 pm »
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).

Offline zammbi

  • float
  • ****
  • Posts: 361
    • View Profile
Re: 3D Sound System
« Reply #362 on: August 26, 2010, 05:16:47 pm »
Sounds like (no pun intended) that coding sound for Linux is quite a bucket of joy.

Quote
Additionally, 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.

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #363 on: August 26, 2010, 10:56:33 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).

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #364 on: October 24, 2010, 05:44:08 am »
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

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #365 on: November 23, 2010, 11:24:19 pm »
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.

Offline fireside

  • double
  • *****
  • Posts: 607
    • View Profile
Re: 3D Sound System
« Reply #366 on: November 24, 2010, 03:08:48 am »
Are there any docs or tutorials for soundsystem jpct?
click here->Fireside 7 Games<-

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #367 on: November 24, 2010, 03:56:50 am »
Are 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)

Offline fireside

  • double
  • *****
  • Posts: 607
    • View Profile
Re: 3D Sound System
« Reply #368 on: December 08, 2010, 02:33:10 am »
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<-

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #369 on: December 08, 2010, 02:42:03 am »
Yes, you can use the core SoundSystem with LibraryJavaSound plugin and any of the codec plugins for unsigned applets

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: 3D Sound System
« Reply #370 on: February 10, 2011, 10:53:06 pm »
Edit: Removed for now...i must have done something fishy...i get exceptions in classes that aren't there... ???
« Last Edit: February 10, 2011, 10:55:14 pm by EgonOlsen »

Offline EgonOlsen

  • Administrator
  • quad
  • *****
  • Posts: 12295
    • View Profile
    • http://www.jpct.net
Re: 3D Sound System
« Reply #371 on: February 10, 2011, 11:24:13 pm »
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

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #372 on: February 11, 2011, 11:06:34 pm »
After 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.

Offline Disastorm

  • long
  • ***
  • Posts: 161
    • View Profile
Re: 3D Sound System
« Reply #373 on: March 25, 2011, 05:22:45 am »
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??
« Last Edit: March 25, 2011, 08:49:41 am by Disastorm »

Offline paulscode

  • double
  • *****
  • Posts: 863
    • View Profile
    • PaulsCode.Com
Re: 3D Sound System
« Reply #374 on: March 27, 2011, 11:42:22 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.