Game Development Community

[B5] DirectSound reduces FPS from 320 to 70

by Eric den Boer · in Torque 3D Professional · 09/22/2009 (3:25 pm) · 34 replies

I'm sorry if this has already been posted, however I ran T3D and saw that it was running unusually slow for my workstation. So I decided to fiddle around some, and I then got it: changing the audio driver fixes this.

This is what I mean:
i34.tinypic.com/2u9jr74.jpgi35.tinypic.com/10wpf92.jpg
When selecting OpenAL I get the best performance (325 fps).

When selecting NULL, I get a heap corruption.

What's up? :)

My hardware: Q6600, 8800GT, 4GB RAM, AC'97 Onboard Audio, latest DirectX update, not sure which version video drivers.
Page«First 1 2 Next»
#21
09/23/2009 (6:04 pm)
Rene, I am on XP sp3.

I edited that in, ..I had accidentally removed it while adding the newer results.
#22
09/23/2009 (6:11 pm)

That even more strongly hints at the Realtek hardware mode being to blame.

Have to do some own testing with DS.
#23
09/23/2009 (6:22 pm)
I'll try installing some new drivers this week, see if that helps.
#24
09/23/2009 (8:04 pm)
My Realtek hardware does not have this deficiency. I would say it's your drivers.
#25
09/23/2009 (8:14 pm)
@Brett: please click apply and exit out of the options panel window.

There were discrepancies, in my tests, with the options window still open.
(Thus: My results were taken after exiting out of the options panel.)
#26
09/23/2009 (8:25 pm)
I can restart the app and switch back and forth with no frame rate issue. I can't confirm whether DSound is running in software mode or not, but it's not causing a performance impact.

img19.imageshack.us/img19/2271/fpsgenrekit200909231820.jpgShrunk it so it fits on the forum, but that shows me enabling XAudio, then DirectSound, even with the console open, options menu closed on DSound it's 572fps, the transparency from the console eats more frames in the GUI than the dsound.

It only supports basic hardware acceleration anyway, no EAX, I3DL2, and since it's onboard it does not have its own memory.

Vista 64, with Realtek Vista 64 drivers.

Hardware ID: HDAUDIO\FUNC_01&VEN_10EC&DEV_0888&SUBSYS_10DE0175&REV_1001
Manufacturer ID: 1
Product ID: 100
Type: WDM
Driver Name: RTKVHD64.sys
Driver Version: 6.00.0001.5745 (English)
Driver Attributes: Final Retail
WHQL Logo'd: Yes
Date and Size: 11/25/2008 17:25:14, 1568032 bytes
#27
09/23/2009 (8:28 pm)
Ah found it. It is not using hardware mode. But I wouldn't want it using hardware mode anyway.

--------- Initializing Directory: scripts ---------
sfxStartup...
SFXSystem::createDevice - created DirectSound device 'Speakers (2- Realtek High Definition Audio)'
SFXDSDevice::setDistanceModel - 'linear' distance attenuation not supported
Provider: DirectSound
Device: Speakers (2- Realtek High Definition Audio)
Hardware: No
Buffers: 16
#28
09/23/2009 (8:33 pm)

Oh yeah, I'm always forgetting the obvious. Eric and eb, try setting $pref::SFX::useHardware to "No".
#29
09/23/2009 (9:14 pm)
I'm more curious if the devices actually have hardware buffers and memory.

In order for it to have hardware on with the device dwMaxHw3DAllBuffers would have to be != 0.

If one of you seeing the issue could run the DirectX Caps Viewer in the DirectX SDK, and look at your DirectSound devices I'd be curious to see what it shows for buffers.

Mine reports 1 max mixing buffers but everything else is 0.
#30
09/23/2009 (9:56 pm)
www.ericrbarth.com/uploadpanel/view/dxcaps.jpg

Rene, was set to "false", now set to "no"..and it helps the issue.
(Who are the einsteins that set those settings ?) :D
#31
09/23/2009 (10:18 pm)

Ha, I'm an idiot (or maybe just getting mighty tired). "Yes"/"No" is nonsense, I was reading the code incorrectly. It is a boolean value using "true"/"1" for yes.

The curious thing is that given this, there should be absolutely no difference if you set to just about anything but precisely "true" or some non-zero number, so the above change shouldn't really do anything.

Sorry for the confusion.
#32
09/23/2009 (11:40 pm)
ok, this is going to make someone's head spin...I feel like I am going insane here.
I *thought* the setting change worked because the fps were not affected after the setting was changed. However, I decided to reboot..and now it is back to: bad framerates with certain audio settings.

I feel like I am losing my mind here...wth is going on?
#33
09/24/2009 (5:23 am)
@Rene: Toggeling the useHarware variable to true or false doesn't help here.
#34
09/24/2009 (3:56 pm)

It may be that your Realtek software is running its "SoundBack". AFAIK this can be disabled. May be worth giving a shot. Should remove Realteks hooks on DirectSound and restore the behavior bestowed upon it by Microsoft. Should be performing well then albeit without hardware-specific enhancements.

But well, overall its best two switch from DirectSound altogether on Vista.
Page«First 1 2 Next»