Dear Stefao,



I was trying the player now with the g723 decoder now. Firstly, the scene

I gave you earlier (with a sphere and sound + g723 encoded stream) seem to

be in correct format in that it does initialize the G723Class object for

decoding audio. The clas G723Class does not however have its own

SetFormat method (as a result a which, when the format is set up in the

StreamConsumer class, it seems to result in ANIMSTREAM format ?!), so I

took the one from file player0d/G723/G723Dec.cpp and .h, to be included as

methods of G723Class. Another change I made to the G723Class::Decode

method, and it now uses the G723Dec() function defined in g723.c file

(that function just takes care that the output is converted to *short

format). SO, what I did was:



included g723.c and .h to G723 dsp

made changes to G723Class.cpp and .h (attached)



...AND tried to see what's still not working. The decoder works ok

for the stream I gave you, but somehow the output stream doesn't work as

it used to be. To be as specific as I can, I found out that when there's

no room in the output buffer of the audiorenderer (which happens approx.

every 1000 ms), the streaming stops due to the fact that AudioSourceProxy

calls the function (when QueueFrameForPlaying(streamID, dataPtr) returns

0 because there's not room in the output buffer at the moment)  

MediaStreamImp :: Release (BOOL flag) with flag = FALSE. This should

notify the stream that this frame should be used later, but nevertheless,

the streaming crashes at that point. IF I call the Release() with TRUE,

even in the case the frame should be read later, the decoding continues

(just to test that the decoding and audiorenderer were working ok), but of

course then part of the frames are discarded before being played.  



I didn't know what more to do, because I couldn't understand what happenes

in the stream in the above situation. The only thing I can say for sure is

that the decoding stopped, and dataPtr = NULL was returned when it is

tried to fetch from the output stream in the AudioSourceProxy::Render.



Any ideas, ...?  



Gia

