OGG chaining libvorbis android
2017-06-27 19:24:42
I am using libvorbis to encode recorded PCM data on android. I am implementing pause/resume capability for that I have to chain multiple ogg logical bit streams into one physical bit stream but when I do that I get a file that shows wrong duration and is unseekable. It plays the audio in the correct order though. What am I not doing or doing something wrong? what is the meaning of absolute granular position of these pages? page 1: 0 0 0 0 0 0 0 0 page 2: 0 0 0 0 0 0 0 0 page 3: 0 0 0 0 0 0 19 -64 page 4: 0 0 0 0 0 0 41 -64 page 5: 0 0 0 0 0 0 65 -128 page 6: 0 0 0 0 0 0 88 64 page 7: 0 0 0 0 0 0 110 64 I am placing the second logical bit stream after the first logical bit stream but still I am getting this bizarre error of wrong duration and unseekable playback. Please can someone tell me the correct way of chaining multiple OGG bit streams? This is the output of ogginfo on an chained ogg fileProcessing file "G1.ogg"... New logical stream (#1, serial: 03d2ac71): type vorbis Vorbis headers parsed for stream 1, information follows... Version: 0 Vendor: Xiph.Org libVorbis I 20101101 (Schaufenugget) Channels: 1 Rate: 32000 Nominal bitrate: 189.949000 kb/s Upper bitrate not set Lower bitrate not set User comments section follows... ENCODER=JNIVorbisEncoder Vorbis stream 1: Total data length: 305896 bytes Playback length: 0m:13.311s Average bitrate: 183.831731 kb/s Logical stream 1 ended New logical stream (#2, serial: 34c74667): type vorbis Vorbis headers parsed for stream 2, information follows... Version: 0 Vendor: Xiph.Org libVorbis I 20101101 (Schaufenugget) Channels: 1 Rate: 32000 Nominal bitrate: 189.949000 kb/s Upper bitrate not set Lower bitrate not set User comments section follows... ENCODER=JNIVorbisEncoder Vorbis stream 2: Total data length: 488682 bytes Playback length: 0m:20.992s Average bitrate: 186.235518 kb/s Logical stream 2 ended