[Speex-dev] Programming questions
Jean-Marc Valin
Jean-Marc.Valin at USherbrooke.ca
Mon Jan 17 01:01:32 PST 2005
> 0) Is it possible to manipulate voice data representing more than
> the frame size of encoder (this seems possible in Speex Java code
> used until now).
Speex itself manipulates audio one frame at the time, but what you do
after that if up to you.
> 1) How can I specify to the encoder that I use 16 bits stereo data ?
> The ctl function allows only to set the sampling rate. I have
> found nowhere some details. In speexenc.c I have seen the use
> of some related to stereo functions but without understanding
> well how to use them.
speex_encode is for float and speex_encode_int is for 16-bit short
integer.
> 2) What is exactly the frame size ? It is an integer representing
> a number of sample or a number of bytes or even a number of
> shorts (in sampleenc.c this seems to be a number of shorts)
Always the number of samples. Speex doesn't care what the original
encoding was.
> 3) How (if this is possible) to decode a certain amount (known) of
> coded data if these coded data represent more than the frame size
> of encoder. This situation arise when the coded data for a
> duration greater than the frame size of decoder are used. Should
> I call some integer number of times the decoding procedure (like
> it is done in the java code of Speex).
Same as encoding. Decoding decodes one frame, but you may call it as
many times as you like.
> 4) What is the difference "SPEEX_GET_FRAME_SIZE" and
> "SPEEX_MODE_FRAME_SIZE" operations. This should not be identical
> since these operations are provided by two different functions
> but I don't see any explanation of a difference in the
> documentation.
Easy. You don't have to create an encoder/decoder state in order to use
SPEEX_MODE_FRAME_SIZE.
Jean-Marc
--
Jean-Marc Valin <Jean-Marc.Valin at USherbrooke.ca>
Université de Sherbrooke
More information about the Speex-dev
mailing list