Game Development Community

[Beta 3 Bug] SFX emitter crash when 3D sound is checked with stream sound

by JesseL · in Torque 3D Professional · 07/02/2009 (9:35 am) · 8 replies

I wanted to set a SFX emitter to a file and start streaming it. All I did was open the level editor choose a SFX emitter --> Name it / choose a file .ogg I choose amb2.ogg --> click on stream sound and click ok.

After adding it to the scene it crashes at this point:

> TorqueMultiplayerDungeon_DEBUG.dll!SFXXAudioVoice::_flush() Line 124 + 0x10 bytes C++
TorqueMultiplayerDungeon_DEBUG.dll!SFXXAudioVoice::_stop() Line 162 C++
TorqueMultiplayerDungeon_DEBUG.dll!SFXXAudioBuffer::_flush() Line 91 C++
TorqueMultiplayerDungeon_DEBUG.dll!SFXBuffer::update() Line 117 C++
TorqueMultiplayerDungeon_DEBUG.dll!AsyncUpdateList::process(int timeOut=-1) Line 35 + 0xc bytes C++
TorqueMultiplayerDungeon_DEBUG.dll!AsyncUpdateThread::run(void * __formal=0x00000000) Line 65 C++
TorqueMultiplayerDungeon_DEBUG.dll!ThreadRunHandler(void * arg=0x0942f890) Line 61 C++
TorqueMultiplayerDungeon_DEBUG.dll!_callthreadstartex() Line 348 + 0xf bytes C
TorqueMultiplayerDungeon_DEBUG.dll!_threadstartex(void * ptd=0x0942fbf0) Line 331 C
kernel32.dll!7521e4a5()
[Frames below may be incorrect and/or missing, no symbols loaded for kernel32.dll]
ntdll.dll!770fcfed()
ntdll.dll!770fd1ff()

About the author

I just realized that if I wanted to create a cat that caught on fire and ran up a telephone pole and then burst into a blue waterfall. That wouldn't be to hard!


#1
07/02/2009 (1:17 pm)

Please try with a different SFX device, too. XAudio still has some issues.

I'll look into this. Logged as THREED-557.

3D sounds and streaming are a bit of a shaky pair ATM. There's no virtualization of streaming sounds so what happens is that regardless of where a 3D sound ends up (e.g. at the other end of the level), its stream will keep working away and use resources. That's definitely something that can be improved upon.
#2
07/05/2009 (8:31 pm)

Fixed for B4.

Please note that amg2.ogg is a stereo sound and thus not a valid sound for 3D playback. Only mono sounds can be played in 3D.
#3
07/05/2009 (8:32 pm)

Ah, wanted to add that playback virtualization for streamed sounds should be working in B4 as well (plus some other goodies like fade effects).
#4
07/06/2009 (12:45 am)
other Goodies like Pitch? Please!
#5
07/06/2009 (6:09 am)

@JesseL
Pitch? You can already set the playback pitch on an SFXSource with setPitch (playing or not).

Do you mean something else? Please describe the feature you want and I see what I can do.
#6
07/06/2009 (2:02 pm)
I'm confused. Perhaps I do not understand how to access the pitch and that is my problem. Perhaps what I mean is the ability to add a different pitch to each different sound effect. For example, if I created a background ambience. I then decided that this background ambience when played in C major or C minor or A minor would give the game a different atmostphere. So instead of recording all of those different versions I just go clickety click on a pitch button for the SFXemitter and change the pitch to what I want. If this is already in the engine could you point me in the right direction to find it?
#7
07/06/2009 (2:09 pm)

Ok, understood. Thanks for the explanation.

Pitch can be set on playback, but this has to be done manually and explicitly for each source, i.e. the SFXSource.setPitch() method has to be called on each source that is created. Since SFXEmitters create SFXSources internally, this would require an engine modification.

Thinking about it, pitch should be a part of SFXDescriptions as it is part of how a particular source is played back. I will add that to SFXDescription and SFXEmitter for B4.
#8
07/06/2009 (2:25 pm)

Done. When B4 is out, please give it a shot.