Quarry
|
 |
«
Posted
2013-08-20 06:59:52 » |
|
1 2 3 4 5 6
| public static void playAt(String sound, float x, float y, float z) { ss.setListenerPosition(Game.player.pos.x, Game.player.pos.y, Game.player.pos.z); ss.setListenerVelocity(Game.player.dVel.x, 0, Game.player.dVel.y); ss.setListenerAngle(Game.player.yaw); ss.quickPlay(false, sound, false, x, y, z, SoundSystemConfig.ATTENUATION_ROLLOFF, 0.03f); } |
My issue is that above code even though I tried every possible value for the rolloff between 0 and 1 (suggested by the PDF paul provided) won't have any change on the sound's volume
|
|
|
|
Quarry
|
 |
«
Reply #1 - Posted
2013-08-20 10:45:19 » |
|
Bump, I need help on this urgently
|
|
|
|
gouessej
|
 |
«
Reply #2 - Posted
2013-08-20 11:12:28 » |
|
Hi
Please keep in mind that we are volunteers.
Which backend do you use? JavaSound? JOAL? Have you looked at the source code? Maybe the roll off factor is not taken into account in some cases.
|
|
|
|
Games published by our own members! Check 'em out!
|
|
nsigma
|
 |
«
Reply #3 - Posted
2013-08-20 11:35:42 » |
|
Which backend do you use? JavaSound? JOAL? Have you looked at the source code? Maybe the roll off factor is not taken into account in some cases.
Also, what OS? I highly suspect you're using the JavaSound backend with a JavaSound implementation that doesn't support volume control - it's a key flaw in this library that it lacks a built in software mixer.
|
Praxis LIVE - hybrid visual IDE for (live) creative coding
|
|
|
Quarry
|
 |
«
Reply #4 - Posted
2013-08-20 11:38:56 » |
|
I'm using LWLJGL OpenAL 1 2 3 4 5 6 7 8 9 10
| Checking if LWJGL OpenAL is compatible... ...yes
Checking if Java Sound is compatible... ...no
Starting up SoundSystem... Initializing LWJGL OpenAL (The LWJGL binding of OpenAL. For more information, see http: OpenAL initialized. |
|
|
|
|
nsigma
|
 |
«
Reply #5 - Posted
2013-08-20 11:42:43 » |
|
Ah well, suspicions incorrect!  Over to someone who knows more about OpenAL and this lib then. 
|
Praxis LIVE - hybrid visual IDE for (live) creative coding
|
|
|
gouessej
|
 |
«
Reply #6 - Posted
2013-08-20 11:54:00 » |
|
it lacks a built in software mixer.
JOAL and its competitor use OpenAL-Soft. Quarry, have you looked at the source code a bit to know whether this setting is not ignored?
|
|
|
|
nsigma
|
 |
«
Reply #7 - Posted
2013-08-20 12:38:40 » |
|
it lacks a built in software mixer.
JOAL and its competitor use OpenAL-Soft. I meant that the JavaSound backend is missing a software mixer. I wish you'd stop using that "competitor" word - it's just going to be confusing to anyone who doesn't know you! 
|
Praxis LIVE - hybrid visual IDE for (live) creative coding
|
|
|
Quarry
|
 |
«
Reply #8 - Posted
2013-08-20 12:44:54 » |
|
I checked the source code and couldn't find anything out of place, this is really bothering me! Here's my Sounder class, I'm not sure if anything is out of place... http://pastebin.com/LN7fEnnq
|
|
|
|
Phased
|
 |
«
Reply #9 - Posted
2013-08-20 12:45:46 » |
|
For the small chance, your passing a global volume sound in, and its not specific to that sound file. 1
| soundSystem.setMasterVolume(1.0f); |
Also, if you decide to reload the sounds into the sound system, you can specify the sound and specify the volume of a particular sound file. 1
| soundSystem.setVolume(sourceName, volume); |
|
|
|
|
Games published by our own members! Check 'em out!
|
|
Quarry
|
 |
«
Reply #10 - Posted
2013-08-20 12:52:15 » |
|
So, I recalled that Minecraft also uses the same library. So I went on to my decompiled copy and found out that it uses ATTENUATION_LINEAR
It works now
Fix your code paul
|
|
|
|
nsigma
|
 |
«
Reply #11 - Posted
2013-08-20 13:04:50 » |
|
Fix your code paul
Ah, writers of free code love that sort of attitude!  How about reporting a bug or asking him about it? Incidentally, are you using a stereo sound file? The JavaDoc does say this only works with mono sounds in OpenAL. May not be a bug at all!
|
Praxis LIVE - hybrid visual IDE for (live) creative coding
|
|
|
Quarry
|
 |
«
Reply #12 - Posted
2013-08-20 13:23:29 » |
|
All my sounds are mono
|
|
|
|
gouessej
|
 |
«
Reply #13 - Posted
2013-08-26 10:28:40 » |
|
I wish you'd stop using that "competitor" word - it's just going to be confusing to anyone who doesn't know you!  There are 2 sets of Java bindings (JogAmp, ...) for several native APIs (OpenGL, OpenAL, OpenCL). Their respective teams are in competition even though I don't like this situation. Therefore, the term "competitor" seems to be the right one.
|
|
|
|
nsigma
|
 |
«
Reply #14 - Posted
2013-08-26 12:49:55 » |
|
I wish you'd stop using that "competitor" word - it's just going to be confusing to anyone who doesn't know you!  There are 2 sets of Java bindings (JogAmp, ...) for several native APIs (OpenGL, OpenAL, OpenCL). Their respective teams are in competition even though I don't like this situation. Therefore, the term "competitor" seems to be the right one. I kind of meant just name the damn thing.  It's called LWJGL - there, not so hard! It's OK for projects to refer to each other. To not do so makes you sound about 5! 
|
Praxis LIVE - hybrid visual IDE for (live) creative coding
|
|
|
|