0
0

I have a problem running FSOUND_Stream_Stop() when it is called from a SynchCallback. The CPU usage is almost 100% and i have to reset my PC.
I believe that using PostMessage (asynchronous call) may solve the problem but i feel this would be ugly 😕 .
I tried to find a clue in this forum but i didn’t find anything.
Here is the minimal code to reproduuce the problem easily:
[code:3d8x0s9v]class CTest
{
FSOUND_STREAM *st;
..
..
}

signed char SynchCallback(FSOUND_STREAM stream, void *buff, int len, int param)
{
CTest *x = (CTest
) param;
x->OnSyncPoint();
return TRUE;
}

void CTest::OnOK()
{
st = FSOUND_Stream_OpenFile("bla bla bla", 0, 0);
FSOUND_Stream_Play(0, st);
FSOUND_Stream_SetSynchCallback(st,(FSOUND_STREAMCALLBACK)SynchCallback, (int)this);
}

void CTest::OnSyncPoint()
{
FSOUND_Stream_Stop(st);
}[/code:3d8x0s9v]
I wish that brett is in a good mode :)

  • You must to post comments
0
0

Thank you anyway for your response.

  • You must to post comments
Showing 1 result
Your Answer

Please first to submit.