Re: Getting samples in a packet without decoding
[email protected] Tue, 5 Aug 2014 21:03:18 -0700
| Newsgroups | gmane.comp.multimedia.ogg.vorbis.devel |
|---|---|
| Message-ID | <CACrD=+_mHE_22xSGxXh8rhz3kiTDLv12ww8mg9NRpB0odZ3_5Q@mail.gmail.com> |
The first packet after any decode [re]start will not return samples. It can't; the MDCT output it produces must be lapped with the output of the following packet to produce finished samples. This is why granule position is 'the position one past the last sample produced decoding a packet', essentially the sample past the middle of the window. Trimming only happens at the stream beginning/ending. Monty