Robert M.
2004-Aug-06 15:01 UTC
[speex-dev] Where to pause stream (minimum decodable length)?
Here is my situation: I have large Speex encoded stream which I would like to playback on wave out device. I could decode whole stream to pcm and play it back as pcm audio, but this is not what I want. Instead I want to decode minimum decodable bits (bytes?) to pcm and play it ... then decode another minimum data chunk and play it, etc. This way I can achieve closest to real-time playback or I can pause and then restart playback. So, my question is: What is minimum length of Speex encoded data where decoder (speex_decode) will still successfully decode input data? In Windows terminology this is called BlockAlign. The block alignment is the minimum atomic unit of data the playback and record software must process at a time . BTW, the sample provided is using frame_size*channels but I don't think this is the minimum. P.S. I need this for my ACM codec driver I'm working on. Robert M. <p><p>--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
Jean-Marc Valin
2004-Aug-06 15:01 UTC
[speex-dev] Where to pause stream (minimum decodable length)?
Yes it's the minimum, as you can't decode half a frame. In Speex frames
are 20ms which should be low enough anyway.
Jean-Marc
Le ven 16/05/2003 à 04:03, Robert M. a écrit :> Here is my situation:
>
> I have large Speex encoded stream which I would like to playback on wave
> out device. I could decode whole stream to pcm and play it back as pcm
> audio, but this is not what I want. Instead I want to decode minimum
> decodable bits (bytes?) to pcm and play it ... then decode another
> minimum data chunk and play it, etc. This way I can achieve closest to
> real-time playback or I can pause and then restart playback. So, my
> question is: What is minimum length of Speex encoded data where decoder
> (speex_decode) will still successfully decode input data? In Windows
> terminology this is called BlockAlign. The block alignment is the
> minimum atomic unit of data the playback and record software must
> process at a time .
>
> BTW, the sample provided is using frame_size*channels but I don't think
> this is the minimum.
>
> P.S. I need this for my ACM codec driver I'm working on.
>
> Robert M.
>
>
>
> --- >8 ----
> List archives: http://www.xiph.org/archives/
> Ogg project homepage: http://www.xiph.org/ogg/
> To unsubscribe from this list, send a message to
'speex-dev-request@xiph.org'
> containing only the word 'unsubscribe' in the body. No subject is
needed.
> Unsubscribe messages sent to the list will be ignored/filtered.
--
Jean-Marc Valin, M.Sc.A.
LABORIUS (http://www.gel.usherb.ca/laborius)
Université de Sherbrooke, Québec, Canada
<p>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: Ceci est une partie de message numériquement signée
Url :
http://lists.xiph.org/pipermail/speex-dev/attachments/20030516/6d56f719/signature-0001.pgp
Robert M.
2004-Aug-06 15:01 UTC
[speex-dev] Where to pause stream (minimum decodable length)?
Thanks Jean-Marc. I'll take this as a fact. I guess I was confused by the equation in your code: bit_rate = st->sampling_rate*SUBMODE(bits_per_frame)/st->frameSize by the parameter SUBMODE(bits_per_frame). Best regards Robert M. Jean-Marc Valin wrote:>Yes it's the minimum, as you can't decode half a frame. In Speex frames >are 20ms which should be low enough anyway. > > Jean-Marc > >Le ven 16/05/2003 à 04:03, Robert M. a écrit : > > >>Here is my situation: >> >>I have large Speex encoded stream which I would like to playback on wave >>out device. I could decode whole stream to pcm and play it back as pcm >>audio, but this is not what I want. Instead I want to decode minimum >>decodable bits (bytes?) to pcm and play it ... then decode another >>minimum data chunk and play it, etc. This way I can achieve closest to >>real-time playback or I can pause and then restart playback. So, my >>question is: What is minimum length of Speex encoded data where decoder >>(speex_decode) will still successfully decode input data? In Windows >>terminology this is called BlockAlign. The block alignment is the >>minimum atomic unit of data the playback and record software must >>process at a time . >> >>BTW, the sample provided is using frame_size*channels but I don't think >>this is the minimum. >> >>P.S. I need this for my ACM codec driver I'm working on. >> >>Robert M. >> >> >> >>--- >8 ---- >>List archives: http://www.xiph.org/archives/ >>Ogg project homepage: http://www.xiph.org/ogg/ >>To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' >>containing only the word 'unsubscribe' in the body. No subject is needed. >>Unsubscribe messages sent to the list will be ignored/filtered. >> >>-- Lep pozdrav / Best regards Robert Milharcic ib-CADdy d.o.o. / www.ib-caddy.si Dunajska 106 SI-1000 Ljubljana Slovenia Tel.: +386 1 566 12 55 Fax.: +386 1 568 22 25 e-mail: robert.milharcic@ib-caddy.si <p><p><p><p>--- >8 ---- List archives: http://www.xiph.org/archives/ Ogg project homepage: http://www.xiph.org/ogg/ To unsubscribe from this list, send a message to 'speex-dev-request@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.