T3D 1.1 beta 2 - Streaming 2D/3D audioMusicLoop = CRASH - RESOLVED
by Steve Acaster · in Torque 3D Professional · 08/04/2010 (7:54 pm) · 11 replies
Was previously reported in 1.1b1 ... but I can't find the thread so ehre's a new one
Build: T3d 1.1 b2
Platform: Windows 7 32 bit
Target: Audio
Issue:
Streaming 2D or 3D music causes a crash.
To repeat:
Use SFXDescription AudioMusicLoop3D or AudioMusicLoop2D for adding music to a main menu = crash
Solution:
As a workaround disable streaming
core/scripts/client/audioDescriptions.cs
Build: T3d 1.1 b2
Platform: Windows 7 32 bit
Target: Audio
Issue:
Streaming 2D or 3D music causes a crash.
To repeat:
Use SFXDescription AudioMusicLoop3D or AudioMusicLoop2D for adding music to a main menu = crash
Solution:
As a workaround disable streaming
core/scripts/client/audioDescriptions.cs
//-----------------------------------------------------------------------------
// Music
//-----------------------------------------------------------------------------
singleton SFXDescription( AudioMusic2D : AudioMusic )
{
isStreaming = true;
};
singleton SFXDescription( AudioMusicLoop2D : AudioMusic )
{
isLooping = true;
// isStreaming = true;// still crashes! yorks
};
singleton SFXDescription( AudioMusic3D : AudioMusic )
{
isStreaming = true;
is3D = true;
};
singleton SFXDescription( AudioMusicLoop3D : AudioMusic )
{
// isStreaming = true; // still crashes! yorks
is3D = true;
isLooping = true;
};About the author
One Bloke ... In His Bedroom ... Making Indie Games ...
#2
08/04/2010 (11:31 pm)
@Steve - What audio provider is set in the options dialog? Does it crash if you change it to other providers?
#3
EDIT
okay, directSound, OpenAL, and Xaudio all crash - Fmod.dll doesn't
08/04/2010 (11:43 pm)
Oh sorry, meant to say that - DirectSound. I'll have a retest in a sec ...EDIT
okay, directSound, OpenAL, and Xaudio all crash - Fmod.dll doesn't
#4
Not good. THREED-1083.
The fact that it's crashing with all but FMOD hints at the threaded loading causing problems since only FMOD doesn't use it (FMOD's own streaming is used). Wondering why though since I don't recall any change there from b1 to b2.
08/05/2010 (2:26 am)
Not good. THREED-1083.
The fact that it's crashing with all but FMOD hints at the threaded loading causing problems since only FMOD doesn't use it (FMOD's own streaming is used). Wondering why though since I don't recall any change there from b1 to b2.
#5
08/05/2010 (2:57 am)
Quote:Rene, this was an issue before 1.1b2 - I just can't find the original thread (might not have been mine)
Wondering why though since I don't recall any change there from b1 to b2.
#6
edit: dang should have edited above post ... oh well, all helps my spam count! :P
08/05/2010 (2:59 am)
ORIGINAL THREAD from 1.1.b1edit: dang should have edited above post ... oh well, all helps my spam count! :P
#7
I might have made one a long time ago XD.
Looks like you were talking about a different one though.
08/05/2010 (3:00 am)
Edit:I might have made one a long time ago XD.
Looks like you were talking about a different one though.
#9
Unfortunately, I had no success reproducing this so far. No crashes (all providers) and the sounds stream and loop like they should.
Steve, if you happen to get a chance, could you post a call stack dump of the crash? That would be awesome. Might give a hint at what's going wrong.
09/13/2010 (6:21 pm)
Unfortunately, I had no success reproducing this so far. No crashes (all providers) and the sounds stream and loop like they should.
Steve, if you happen to get a chance, could you post a call stack dump of the crash? That would be awesome. Might give a hint at what's going wrong.
#11
Should be fixed in b3.
The reason was this piece of code:
The misplaced reinterpret_cast here lead to the reset() call going through the wrong vtable depending on how the stream class was made up.
This is what it should look like:
Also noticed streaming problems with XAudio again. Just not happy with the state of the XAudio SFX provider.
09/13/2010 (7:13 pm)
Should be fixed in b3.
The reason was this piece of code:
if( dynamic_cast< IResettable* >( s ) )
{
reinterpret_cast< IResettable* >( s )->reset();
isEOS = false;
this->mNumRemainingSourceElements = mNumTotalSourceElements;
}The misplaced reinterpret_cast here lead to the reset() call going through the wrong vtable depending on how the stream class was made up.
This is what it should look like:
IResettable* resettable = dynamic_cast< IResettable* >( s );
if( resettable )
{
resettable->reset();
isEOS = false;
this->mNumRemainingSourceElements = mNumTotalSourceElements;
}Also noticed streaming problems with XAudio again. Just not happy with the state of the XAudio SFX provider.
ZeroFault
Default Studio Name