[Speex-dev] number of samples in input_frame

Thomas Leigh
2007-06-27T00:36:59Z

Ah ok, thanks for replying!



From: Jonas T?rnstr?m [mailto:jonas@esportnetwork.com]
Sent: 26 June 2007 22:33
To: Thomas Leigh
Cc: speex-dev@xiph.org
Subject: Re: [Speex-dev] number of samples in input_frame



That is a dumb question :)

The encoder expects SPEEX_GET_FRAME_SIZE at all times. If you are encoding from
a fixed length source you must pad the last frame with 0 valued samples.

speexenc / speexdec should provide the sample could you need I guess.

//JT

Thomas Leigh wrote:

Hi all



Sorry if this is a dumb question: does the input_frame passed to
speex_encode_int *have* to be frame_size samples long?



e.g., If I only have 100 samples left to encode (which is less than the
frame_size of 160 samples), can I just use an array that contains 100 samples,
or do I need to create an array containing the 100 "real" samples plus
60 null samples at the end?



Let me put it one more way for clarity: is the response to SPEEX_GET_FRAME_SIZE
a maximum, can I use shorter frames if I want?





-Thom






________________________________




_______________________________________________
Speex-dev mailing list
Speex-dev@xiph.org
http://lists.xiph.org/mailman/listinfo/speex-dev




-- This message has been scanned for viruses by Sophos PureMessage.

-------------- next part --------------
An HTML attachment was scrubbed...