instantreality forum
news: Welcome to the instantreality forums!
 
*
Welcome, Guest. Please login or register.
Did you miss your activation email?
November 23, 2017, 10:31:26 am


Login with username, password and session length


Pages: [1]
  Print  
Author Topic: Sound Node Bug  (Read 6271 times)
pyth7
Jr. Member
**
Posts: 86


View Profile
« on: April 13, 2010, 11:00:28 am »

Hi,
Instant Player ignores the maxFront ect parameters in the included IntensityTest.wrl
The creaking door sound is heard right at the entry viewpoint
when in fact it shouldn't be heard until the user reaches -10 meters on the z axis.
The yellow cone is marks the 0 0 -30 location of the Sound Node.

The file works right in Contact, OctagaPlayer and CosmoPlayer.

Thanks
Russ Kinter

Logged
jbehr
Administrator
Full Member
*****
Posts: 155


View Profile
« Reply #1 on: April 13, 2010, 09:51:40 pm »

Is this on Windows ?

regards
johannes
Logged
pyth7
Jr. Member
**
Posts: 86


View Profile
« Reply #2 on: April 14, 2010, 01:55:30 am »

Is this on Windows ?

regards
johannes

Yes -XP,
The problem is on my iMac PowerPC G5 as well.

Russ Kinter
« Last Edit: April 14, 2010, 06:45:51 pm by pyth7 » Logged
pyth7
Jr. Member
**
Posts: 86


View Profile
« Reply #3 on: April 29, 2010, 11:06:10 am »

I got a friend to test with Windows7 on a much newer machine and the problem doesn't seem to exist:
http://vrml-x3d.ning.com/group/
deepmatrixmultiusersystemdeepmatrixmultiusersystem/forum/topics/instant-player-sound-node-bug?page=1&commentId=2236150%3AComment%3A15850&x=1#2236150Comment15850

I take it the problem is related to the hardware age of my machines?
The XP computer is four years old and the IMac G5 a little older than that. Both run InstantPlayer fine other than this Sound Node issue.
Logged
pdaehne
Administrator
Sr. Member
*****
Posts: 250


View Profile
« Reply #4 on: April 29, 2010, 05:13:18 pm »

Hello Russ,

just to shed some light onto this issue:

Our implementation of the Sound node is based on DirectSound on Windows and OpenAL on Mac OS and Linux. Both APIs are de facto standards used by almost all 3D applications (games).

Unfortunately, both APIs use a sound model that is completely different from the one specified for VRML/X3D. DirectSound and OpenAL use a "sound cone", while VRML uses a "sound ellipsoid". I do not want to go into detail here, have a look into the DirectSound, OpenAL and X3D specifications for more information.

When we started implementing the Sound node we had to make the decision whether to implement an X3D spec conformant 3D sound library from the scratch or to simply map the X3D sound model onto the model used by DirectSound and OpenAL. We took the latter approach. The consequence is that we are not X3D spec conformant. For example, we do not handle minBack, minFront, maxBack and maxFront correctly because these parameters do not exist in the model used by DirectSound and OpenAL. Instead of a sound ellipsoid, we use a sphere. Our DirectSound implementation sets the maximum sound intensity at minFront, and a sound intensity of 0 at maxFront. minBack and maxBack are ignored. Our OpenAL implementation sets maximum sound intensity at (minFront + minBack) / 2, and a sound intensity of 0 at (maxFront + maxBack) / 2. (I just realized when writing this post that both implementations are different - we should harmonize that.)

Ok, that's just some background information. Back to your problem.

Up to Windows XP, sound card manufacturers had the option to replace the default Microsoft DirectSound implementation by their own implementations, e.g. to use some hardware acceleration on their sound card. Unfortunately, many of these hardware implementations are broken. A typical symptom is the bug you've noticed - you can hear sound even if it's beyond maxBack/maxFront. Starting with Windows Vista, sound card manufacturers cannot replace the standard MS DirectSound implementation anymore (as a consequence, there is no hardware accelerated sound via DirectSound on Vista and 7). So the whole issue does not exist on Vista and 7.

So what are your options now? You can simply disable hardware acceleration for your sound card on your XP machine. I do not have an XP machine available right now, but you'll find information about how to do that on the Internet.

Bye,

Patrick
« Last Edit: April 30, 2010, 01:13:27 pm by pdaehne » Logged
pyth7
Jr. Member
**
Posts: 86


View Profile
« Reply #5 on: April 29, 2010, 08:48:58 pm »

Thanks Patrick!
The relatively good news is that I didn't have to turn accelaration all the way off to "None", but only set it to "Basic" on my SB X-Fi card.
Any advice for the iMac? There doesn't appear to be any settings for hardware acceleration.

Russ
Logged
pdaehne
Administrator
Sr. Member
*****
Posts: 250


View Profile
« Reply #6 on: April 30, 2010, 02:28:33 pm »

No, there is nothing you can do on Macs. (Like on Windows Vista and 7, there is no hardware accelerated sound on Macs.)

I've had another look into our sound implementation. In DirectSound and OpenAL, sound intensity is not interpolated linearly between the maximum and the minimum distance, instead logarithmically - the volume doubles when the distance is halved. So sound is audible even when you're infinite far away. On DirectSound, we clip away the sound source at maximum distance (that's why the sound starts abruptly when you approach the sound source). On OpenAL, clipping is not supported.

Sorry for that. Our sound code surely needs some major overhaul, but at the moment that is out of scope.

Bye,

Patrick
Logged
srhira103
Newbie
*
Posts: 1


View Profile WWW
« Reply #7 on: June 02, 2011, 07:51:40 am »

The relatively good news is that I didn't have to turn accelaration all the way off to "None", but only set it to "Basic" on my SB X-Fi card. Undecided
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by SMF 1.1.15 | SMF © 2011, Simple Machines