Displaying 2 results from an estimated 2 matches for "vorb_block".
Did you mean:
vorbis_block
2006 Jan 19
0
want to know, how much data will be extracted from every single packet
...after synthesys)? coz i need to seek quickly to the byte no X in unpacked audio stream as it will be uncompressed PCM.
for now when program starts, i must run through all pages, getting all packets, extracting all of them and getting result datasize using such code:
....
if (vorbis_synthesis(&vorb_block,&m_packets[cur_packet_num]) == 0)
vorbis_synthesis_blockin(&vorb_dsp_state,&vorb_block);
int bout = vorbis_synthesis_pcmout(&vorb_dsp_state,NULL);
packet_result_data_size[cur_packet_num] =
bout * sizeof(int16) * vorb_info.channels;
....
of coz it's very slow, but i can'...
2006 Jan 19
0
re: want to know, how much data will be extracted from every single packet; solved but some issues
...kets. As i read different mail lists i found metion about the fact that for unpacking packet X one need unpack packet X - 1 befor.
I honestly tried do this, but in fact works properly only this code:
for (uint32 i = m_packets_number - 6; i < m_packets_number; i++)
{
?if (vorbis_synthesis(&vorb_block,&m_packets[i])==0)
? vorbis_synthesis_blockin(&vorb_dsp_state,&vorb_block);
?int bout = vorbis_synthesis_pcmout(&vorb_dsp_state,NULL);
?if (i == m_packets_number - 1)
?{
? m_packets_real_lengths[i] ?= 2 * m_vorb_info.channels * bout;
? m_data_size += m_packets_real_lengths[i]...