- time_total = ov_time_total(&of, -1);
- raw_total = ov_raw_total(&of, -1);
- *seconds = time_total;
- vi_sampling_rate = vi->rate;
- vi_bitrate = ov_bitrate(&of, 0);
- rewind(file);
- *frames = ogg_compute_chunk_table(&of, time_total);
- rewind(file);
- *vss_chunk_table = chunk_table;
- sprintf(info_str, "audio_file_info1:%lu x %lu, %ldkHz, %d channels, %ldkbps\n"
- "audio_file_info2: \n"
- "audio_file_info3: \n",
- *frames, (long unsigned) (chunk_time * 1000 * 1000),
- vi_sampling_rate / 1000, vi->channels, vi_bitrate / 1000
- );
- rewind(file);
- audio_file = file;
+ afhi->seconds_total = ov_time_total(&of, -1);
+ afhi->frequency = vi->rate;
+ afhi->bitrate = ov_bitrate(&of, 0) / 1000;
+ afhi->channels = vi->channels;
+ afhi->chunks_total = ogg_compute_chunk_table(&of, afhi, afhi->seconds_total);
+ afhi->chunk_tv.tv_sec = 0;
+ afhi->chunk_tv.tv_usec = 250 * 1000;
+ ogg_get_vorbis_comments(&of, afhi);