digitalmars.D - a really strange problem
- yunwind (29/29) Sep 10 2008 hello everyone, I meet a very strange problem, the function below give s...
hello everyone, I meet a very strange problem, the function below give strange
result:
2008-09-10 21:13:46,828 Trace game.log - audio sound 822650 259d7c8
2008-09-10 21:13:46,829 Trace game.log - audio 259d7d8 259d7c8
2008-09-10 21:13:46,829 Trace game.log - audio e 259d7c8
2008-09-10 21:13:46,829 Trace game.log - audio e 259d7c8
It seems the stack corrupt, but if I uncomment the declaration of sound1 or
remove the line of FMOD_System_CreateStream, then everything is ok:
2008-09-10 21:20:56,745 Trace game.log - audio sound a62650 255d7c8
2008-09-10 21:20:56,746 Trace game.log - audio a62650 255d7c8
2008-09-10 21:20:56,746 Trace game.log - audio a62650 255d7c8
2008-09-10 21:20:56,747 Trace game.log - audio a62650 255d7c8
I am not sure is it a bug, anyone can give some hints? thanks!
Audio createAudio(char[] name, bool stream = false)
{
FMOD_SOUND* sound; //FMOD_SOUND is a typedef of void*
//FMOD_SOUND* sound1;
if (stream) {
FMOD_System_CreateStream(mSystem, toStringz(name), FMOD_SOFTWARE, null,
&sound);
logger.trace("audio stream {} {}", mSystem, sound);
}else {
FMOD_System_CreateSound(mSystem, toStringz(name), FMOD_SOFTWARE, null,
&sound);
logger.trace("audio sound {} {}", mSystem, sound);
}
logger.trace("audio {} {}", mSystem, sound);
logger.trace("audio {} {}", mSystem, sound);
auto audio = new Audio(null, null);
logger.trace("audio {} {}", mSystem, sound);
return audio;
}
Sep 10 2008








yunwind <yunwind msn.com>