however....
I'm having a very curious error while playing a sound with Irrklang in an SDL application.
This is my code:
Code: Select all
/*Main Function*/
......
f32 Posoncircle = 0;
while(Posoncircle < 16*PI)
{
SDL_BlitSurface(Loading,&BG->clip_rect,Screen,&Screen->clip_rect);
SDL_Flip(Screen);
SDL_PollEvent(EVT);
Engine->setListenerPosition(core::vector3df(0,0,0), core::vector3df(0,0,1));
Sound->setPosition(vector3df(sinf(Posoncircle)*5.0f,cosf(Posoncircle)*2,0));
Sound->setMinDistance(5.0f);
Posoncircle += 0.04f;
SDL_Delay(100);
//printf("\rX=%f y=%f sinf((double)Posoncircle)*5,sinf((double)Posoncircle)*2.5);
}
.....
If I would not comment out the "printf" instruction all would work perfect
The same if i comment out the "SDL_POLLEvent(...)"
The curious thing is: when I replace my printf instruction with 'printf(" ")' I get the same error.
Can anyone give me an answare