search for: cur_packet_num

Displaying 2 results from an estimated 2 matches for "cur_packet_num".

2006 Jan 19
0
re: want to know, how much data will be extracted from every single packet; solved but some issues
...ood, is just auxiliary for the next one. In addition, it holds (it can be found via vorbis_packet_blocksize) size of pcm data, that the next one holds. In general every packet holds part of size of pcm data in next packet, i.e.: ? ? ? cur = vorbis_packet_blocksize(&m_vorb_info, &m_packets[cur_packet_num]); ? ? ? if ( cur <= 0 ) ? ? ? ? ?m_packets_real_lengths[cur_packet_num] = 0; ? ? ? else ? ? ? { ? ? ? ?if (prev == 0 ) ? ? ? ? prev = cur; ? ? ? if (cur_packet_num > 3 && cur_packet_num < m_packets_number - 1) ? ? ? { ? ? ? ? m_packets_real_lengths[cur_packet_num] = cur +...
2006 Jan 19
0
want to know, how much data will be extracted from every single packet
...eed 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't help to solve that problem...