Audio Help Needed - Sounds Won't Play

deanej

Deity
Joined
Apr 8, 2006
Messages
4,859
Location
New York State
I've been having problems with some of the sounds for version 2.0 of my Star Trek mod. Problem is, the sounds won't play in civ. My older audio and some of the newer stuff will, but not all. I've attached three of the problem files (I don't know if there are more, there probably are, but I don't know how to test them within civ and WMP plays them fine) as well as my audio XML files (the Locutus one is not linked in directly because I switched it to another file when I first discovered the problem). Could someone tell me if there is a way I can get these files to play in civ? Any help would be appreciated. Thanks in advance.
 
Does anyone know anything? I tried re-encoding them using a free audio conversion program but it didn't work. Is there a way to test them in civ so I can see what does/does not play? It's impossible to test era music, as everything plays fine in WMP.

Please help. I don't know where to get music to replace the tracks that won't play, and I don't want civs that have no diplo music!
 
If your sounds are located in Audio2DScripts you can use CyInterface().playGeneralSoundByID(iScriptID) to play them. The iScriptID is the location of the sound in the file. 0 is the first sound, 1 is the second, etc.... There is probably a better way to use the iScriptID value, using the names of sounds instead, but I don't know it off the top of my head. If you don't turn off the current song first, this will play over top of it, but it should be good enough for testing. There is another function called playGeneralSound that get passed a string, but I couldn't get that to work in the short time that if messed with it.


Edit: Whoops, I just noticed the link above that talks about the same thing.
 
I'm now in the process of testing each sound (I'm actually debugging the python for it). I managed to fix one because I noticed that the script for it was defective when I was putting the python in. I'll post again with any results/python issues I get.

Is there a way I can turn them OFF when done? Some of the tracks exceed three minutes in length, and with around 100 songs to test, I simply don't have the time to wait for them to finish playing.

EDIT: I am in serious need of python help now. I put everything in one big if statment in onBeginGameTurn, with a different sound playing every turn, but instead of that it plays the sound for the turn and every sound that came before it. So on turn 2 it plays the opening menu, and on turn 3 it plays the mirror universe diplo AND the opening menu.

Code:
		szTag = ""

		if(iGameTurn == 1):
                    szTag = "AS2D_OPENING_MENU"
                elif(iGameTurn == 2):
                    szTag = "AS2D_DIPLO_MIRROR"
                elif(iGameTurn == 3):
                    szTag = "AS2D_DIPLO_XINDI"
                elif(iGameTurn == 4):
                    szTag = "AS2D_DIPLO_ORIAN"
                elif(iGameTurn == 5):
                    szTag = "AS2D_DIPLO_MAQUIS"
                elif(iGameTurn == 6):
                    szTag = "AS2D_DIPLO_FIRSTFEDERATION"
                elif(iGameTurn == 7):
                    szTag = "AS2D_DIPLO_THOLIAN"
                elif(iGameTurn == 8):
                    szTag = "AS2D_DIPLO_GORN"
                elif(iGameTurn == 9):
                    szTag = "AS2D_DIPLO_VAADWAUR"
                elif(iGameTurn == 10):
                    szTag = "AS2D_DIPLO_DECAREN"
                elif(iGameTurn == 11):
                    szTag = "AS2D_DIPLO_ANNORAX"
                elif(iGameTurn == 12):
                    szTag = "AS2D_DIPLO_DENARA_PEL"
                elif(iGameTurn == 13):
                    szTag = "AS2D_DIPLO_FEMALE_CHANGELING"
                elif(iGameTurn == 14):
                    szTag = "AS2D_DIPLO_ROMULAN"
                elif(iGameTurn == 15):
                    szTag = "AS2D_DIPLO_CULLUH"
                elif(iGameTurn == 16):
                    szTag = "AS2D_DIPLO_THOT_GOR"
                elif(iGameTurn == 17):
                    szTag = "AS2D_DIPLO_SHAKAAR"
                elif(iGameTurn == 18):
                    szTag = "AS2D_DIPLO_KASHYK"
                elif(iGameTurn == 19):
                    szTag = "AS2D_DIPLO_GUL_DUKAT"
                elif(iGameTurn == 20):
                    szTag = "AS2D_DIPLO_FERENGI"
                elif(iGameTurn == 21):
                    szTag = "AS2D_DIPLO_KLINGON"
                elif(iGameTurn == 22):
                    szTag = "AS2D_DIPLO_LOCUTUS"
                elif(iGameTurn == 23):
                    szTag = "AS2D_DIPLO_BORG_QUEEN"
                elif(iGameTurn == 24):
                    szTag = "AS2D_DIPLO_FEDERATION"
                    
                CyInterface().playGeneralSound(szTag)
 
The code appears OK to me. Could it be that the song is just continuing to play from the previous turn?
 
I waited for it to end before ending the turn, but they seem to be looping (even the opening menu, but the others make sense because it's diplo music that I was testing at the time)

Oddly, after fixing that one tag, ALL the diplo music works fine even if it previously didn't. I need to test the era music next, the bulk of the work.
 
I've checked the era music and found one that won't work. Here's the error message in the audio log:
[13720.625] WRN: Audio System: Could not setup 2D stream ´žÁ°ÝÀ with handleId 6
[13720.625] WRN: FAudioManager::Load2DStream(): Could not initialize sound handle.
[13720.625] ERR: FSharedSoundData::Load: Could not load file c:\documents and settings\jon deane.jon\my documents\my games\beyond the sword\customassets\sounds\soundtrack\tos\tosbak.mp3.
[13720.625] WRN: Stream could not be loaded, GlobalId: 14
[13720.625] WRN: FSound::DoLoad: Sound Sounds/Soundtrack/TOS/tosbak could acquire a loaded buffer.
[13720.625] WRN: FAudioManager::DoSound(): Could not load scriptId 14./n
 
I waited for it to end before ending the turn, but they seem to be looping (even the opening menu, but the others make sense because it's diplo music that I was testing at the time)

Oddly, after fixing that one tag, ALL the diplo music works fine even if it previously didn't. I need to test the era music next, the bulk of the work.

This is kind of obvious, so I apologize if you already checked it. Is bLooping in Audio2DScripts.xml set to one for the music that is looping?
 
Back
Top Bottom