dolphin King
asked on
enhance the following code
I had this question after viewing FMX and jaudiotracker playing memory stream.
this is working very well but there is some small problems when this code executed
if the app is running in the back ground the voice start to cutting also while executing when i do as example scrolling to some control the app hanging any idea how to enhance this ?
this is working very well but there is some small problems when this code executed
while ( MSCLIENT.Position < MSCLIENT.Size ) do //there is still data in a stream
begin
AudioDataSize := MSCLIENT.Read(AudioStream.Data^, Audiodataset);
try
(AudioPlay as JAudioTrack).write(AudioStream, 0, AudioDataSize);
except
end;
end;
if the app is running in the back ground the voice start to cutting also while executing when i do as example scrolling to some control the app hanging any idea how to enhance this ?
Think that code should be in separate thread. Is it for android? os windows?
ASKER
but this code runs already in callback procdure that comes from a thread that synchronized the callback
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.