Brendan Bolles
2014-Aug-06 00:24 UTC
[Vorbis-dev] Getting samples in a packet without decoding
Hi everyone, when you have a vorbis packet and then call vorbis_synthesis(), vorbis_synthesis_blockin(), and finally vorbis_synthesis_pcmout(), that last call tells you how many samples are in the packet. Is there any way to get that information without actually decoding the packet? WebM doesn't store the sample index (granulepos) like Ogg does, so I have to scan through the audio and re-build that information if I want to do sample-accurate seeking. Brendan
xiphmont at xiph.org
2014-Aug-06 00:40 UTC
[Vorbis-dev] Getting samples in a packet without decoding
On Tue, Aug 5, 2014 at 5:24 PM, Brendan Bolles <brendan at fnordware.com> wrote:> Hi everyone, when you have a vorbis packet and then call vorbis_synthesis(), vorbis_synthesis_blockin(), and finally vorbis_synthesis_pcmout(), that last call tells you how many samples are in the packet. Is there any way to get that information without actually decoding the packet?extern long vorbis_packet_blocksize(vorbis_info *vi,ogg_packet *op); should be what you want.