Hi all,
I'm porting a music player which convert midi data format to PCM data format and passPCM data frame by frame, and i am passing every frame to driver (using interface CMdaAudioOutputStream WriteL). I'm sending you the detail senario as follows:



case (1)At first we tried:


Thread1
{
:
while{
if(flag){
Synthesizer();
player();
reset_flag();
break;
}
}

callback
{
set_flag();
}


It doesn't work. We don't know why but the flag does not be set
at callback routine.

case (2)Then, we tried

Thread1
{
:
:
}

callback
{
Synthesizer();
player();
}

After Callback are called sevral times, it crashes
with error code "KIsaDriverName 10". It seems to us
that maybe synthesizer output buffer send to stack,
and maybe stack is overflow, after sevral callback are
called.

Execution Senario:
we are using Tls() mechanism to handle the global variables.
Once all interface has been initialized we are writing PCM data
frames to driver(using interface CMdaAudioOutputStream WriteL).
Once data has been written to driver,
MaoscBufferCopied() callback has been called by framework
automatically,
case (1) we just set a flag, but flag is not set.

case (2)again we are writing the next frame data inside
MaoscBufferCopied() to pass regular frame data for streaming.
But after calling certain times it gives panic (KIsaDriverName 10 )
inside framework after returning from MaoscBufferCopied() and
did not return to this call back again.

Execution sequence:
1. Initialize sound interface.
2.Generate PCM data Frame
3.Pass this frame data to WriteL
Callback function MaoscBufferCopied() will be called,
in this function
case (1) set flag
case (2) again we generate PCM Frame data and pass it to
WriteL and it will repeat till PCM data is available.

SDK version: 7.0s Series60_v21
we are using Mono:16KHz settings.
Same implementaion concept works fine on Series 60 EMULTOR.

Thanx in advance