T3D 1.1 Beta 1 - Looping sound doesn't fade out under Logarithmic Sound Distance Model - LOGGED
by Dusty Monk · in Torque 3D Professional · 07/29/2010 (10:44 pm) · 4 replies
Build: 1.1 Beta 1
Platform: Windows 7, 64 bit
Target: Normal gameplay
Issues:
Under the FMOD sound provider, if you have the SoundDistanceModel set to "Logarithmic", a looping sound will never completely fade out, regardless of what maxdistance you have set for the audio description.
Steps to Repeat:
Install and correctly configure an FMOD audio provider.
Create an empty level, and place an audio provider in the level with a continous looping sound. For me, it's a vehicle with a looping engine sound, using AudioCloseLoop3D audio description (max distance of 50). By default, the SoundDistanceModel for the LevelInfo object is set to "Logarithmic", so no change is necessary.
Using a standard player as listener, walk away from the provider. The volume level will fade, but never fade completely out.
Activate the level editor, and change the SoundDistanceModel to "Linear". Save the level, reload it (by exiting and re-entering), and repeat the procedure.
Notice that the audio eventually fades completely out as you walk away.
Expected Behavior:
For the sound volume to eventually fade completely out under the "Logarithmic" soundDistanceModel.
Platform: Windows 7, 64 bit
Target: Normal gameplay
Issues:
Under the FMOD sound provider, if you have the SoundDistanceModel set to "Logarithmic", a looping sound will never completely fade out, regardless of what maxdistance you have set for the audio description.
Steps to Repeat:
Install and correctly configure an FMOD audio provider.
Create an empty level, and place an audio provider in the level with a continous looping sound. For me, it's a vehicle with a looping engine sound, using AudioCloseLoop3D audio description (max distance of 50). By default, the SoundDistanceModel for the LevelInfo object is set to "Logarithmic", so no change is necessary.
Using a standard player as listener, walk away from the provider. The volume level will fade, but never fade completely out.
Activate the level editor, and change the SoundDistanceModel to "Linear". Save the level, reload it (by exiting and re-entering), and repeat the procedure.
Notice that the audio eventually fades completely out as you walk away.
Expected Behavior:
For the sound volume to eventually fade completely out under the "Logarithmic" soundDistanceModel.
About the author
Dusty Monk is founder and president of Windstorm Studios, an independant game studio. Formerly a sr. programmer at Ensemble Studios, Dusty has worked on AAA titles such as Age of Empires II & III, and Halo Wars.
#2
Logarithmic falloff is more difficult to control than linear falloff but will usually yield more realistic falloff curves. It all depends, though, on having good min and max settings.
//BTW: This behavior isn't specific to FMOD.
09/07/2010 (1:39 pm)
Actually, this is correct (and documented :) behavior. Logarithmic falloff does not behave like linear falloff where the max distance is a cutoff point. Instead, with logarithmic falloff, the sound volume halves every min distance steps starting at min distance away from the emitter. The max distance simply is a point where the emitter's volume is no longer attenuated and will remain constant from there on out.Logarithmic falloff is more difficult to control than linear falloff but will usually yield more realistic falloff curves. It all depends, though, on having good min and max settings.
//BTW: This behavior isn't specific to FMOD.
#3
Thanks for the heads up. FWIW, in my testing, the DirectSound provider does, in fact, fade completely out under the algorithmic fading model. As it is the default provider, I had assumed this was correct behavior, which was why I logged FMOD's behavior. I re-verified this morning, and under T3D 1.1B2, the DirectSound provider still fades out completely when I exceed max distance under the algorithmic fadeoff model.
I know DirectSound behavior can vary from one hardware config to another. Here is the relevant (hopefully) dxDiag info:
I am using the March 2009 SDK.
Thanks!
Dusty
09/07/2010 (2:57 pm)
@Rene: Thanks for the heads up. FWIW, in my testing, the DirectSound provider does, in fact, fade completely out under the algorithmic fading model. As it is the default provider, I had assumed this was correct behavior, which was why I logged FMOD's behavior. I re-verified this morning, and under T3D 1.1B2, the DirectSound provider still fades out completely when I exceed max distance under the algorithmic fadeoff model.
I know DirectSound behavior can vary from one hardware config to another. Here is the relevant (hopefully) dxDiag info:
------------------
System Information
------------------
Time of this report: 7/8/2010, 21:32:55
Machine name: NYTERAVEN
Operating System: Windows 7 Ultimate 64-bit (6.1, Build 7600) (7600.win7_gdr.100226-1909)
Language: English (Regional Setting: English)
System Manufacturer: Gigabyte Technology Co., Ltd.
System Model: EP35C-DS3R
BIOS: Award Modular BIOS v6.00PG
Processor: Intel(R) Core(TM)2 Duo CPU E8400 @ 3.00GHz (2 CPUs), ~3.0GHz
Memory: 4096MB RAM
Available OS Memory: 4094MB RAM
Page File: 2460MB used, 5726MB available
Windows Dir: C:\Windows
DirectX Version: DirectX 11
DX Setup Parameters: Not found
User DPI Setting: Using System DPI
System DPI Setting: 96 DPI (100 percent)
DWM DPI Scaling: Disabled
DxDiag Version: 6.01.7600.16385 32bit Unicode
-------------
Sound Devices
-------------
Description: Speakers (High Definition Audio Device)
Default Sound Playback: Yes
Default Voice Playback: Yes
Hardware ID: HDAUDIO\FUNC_01&VEN_10EC&DEV_0885&SUBSYS_1458A002&REV_1001
Manufacturer ID: 1
Product ID: 65535
Type: WDM
Driver Name: HdAudio.sys
Driver Version: 6.01.7600.16385 (English)
Driver Attributes: Final Retail
WHQL Logo'd: n/a
Date and Size: 7/13/2009 19:07:00, 350208 bytes
Other Files:
Driver Provider: Microsoft
HW Accel Level: Basic
Cap Flags: 0x0
Min/Max Sample Rate: 0, 0
Static/Strm HW Mix Bufs: 0, 0
Static/Strm HW 3D Bufs: 0, 0
HW Memory: 0
Voice Management: No
EAX(tm) 2.0 Listen/Src: No, No
I3DL2(tm) Listen/Src: No, No
Sensaura(tm) ZoomFX(tm): NoI am using the March 2009 SDK.
Thanks!
Dusty
#4
Ah, you're right. Looking at the DS code, I found that it explicitly configures the DS sound buffers to cut out completely at max distance--which makes it behave differently than the other providers.
09/07/2010 (3:11 pm)
Ah, you're right. Looking at the DS code, I found that it explicitly configures the DS sound buffers to cut out completely at max distance--which makes it behave differently than the other providers.
Associate Scott Burns
GG Alumni