Page 1 of 1

Sound only works when I am hosting

Posted: 09 Jan 2007, 23:51
by Majestic
Hi guys

Strange problem here. I've found in the new version of Spring, that my sound will only work if I am hosting, or running the singplayer "Spring Test".

I have a soundblaster Audigy with the latest drivers. Sound works fine in absolutely everything else.

The infolog.txt for when I join a game someone else is hosting reads as
"Map: Small Supreme Battlefield V2.smf
Mod: "Balanced Annihilation V4.5" from BA45.sd7
Loading sound driver failed, disabling sound
Error: DxSound: Could not initialize com
Number of damage types: 42
TA Spring 0.74b2"

Whereas when I host:
Map: DeltaSiege.smf
Mod: "Absolute Annihilation 2.23" from AASS223.sdz
Number of damage types: 41


Does anyone have any ideas? Unfortunately I am behind a firewall, and holepunching doesn't seem to work, so hosting is not an option for me, which means no sound in Spring :(

I have looked around and couldn't see anyone else with this problem.

Posted: 13 Jan 2007, 05:33
by Majestic
Bump? :(

Posted: 26 Nov 2007, 05:22
by iddq?
I've got the same problem in version 0.75b2, seems to be a bug in rts\System\Platform\Win\DxSound.cpp on Line 58.

Spring is calling CoInitialize to initialise the com library and checks the return value to see if it succeeded. The problem is that it's only checking for two of the three possible results (S_OK, S_FALSE), and the value being returned is RPC_E_CHANGED_MODE (0x80010106 in hex, means threading mode has already been set to something else and can't be changed). Modifying this to accept all three values seems to fix it.

Change:
if( hr!=S_OK && hr!=S_FALSE){
To:
if( hr!=S_OK && hr!=S_FALSE && hr!=RPC_E_CHANGED_MODE){

Posted: 26 Nov 2007, 09:01
by Tobi
Ah, thanks for figuring that one out! Should be fixed now in SVN.

Posted: 26 Nov 2007, 20:34
by MightySheep
:shock: jesus i feel really stupid around you guys who know all that.