Sound only works when I am hosting

Sound only works when I am hosting

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
Majestic
Posts: 2
Joined: 09 Jan 2007, 13:12

Sound only works when I am hosting

Post 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.
Majestic
Posts: 2
Joined: 09 Jan 2007, 13:12

Post by Majestic »

Bump? :(
iddq?
Posts: 3
Joined: 20 Jun 2007, 14:37

Post 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){
Tobi
Spring Developer
Posts: 4598
Joined: 01 Jun 2005, 11:36

Post by Tobi »

Ah, thanks for figuring that one out! Should be fixed now in SVN.
User avatar
MightySheep
Posts: 243
Joined: 11 Nov 2007, 02:17

Post by MightySheep »

:shock: jesus i feel really stupid around you guys who know all that.
Post Reply

Return to “Help & Bugs”