From saga_800 at 163.com Tue Aug 7 06:00:13 2012 From: saga_800 at 163.com (Liu Rui) Date: Tue, 7 Aug 2012 21:00:13 +0800 Subject: [Vorbis-dev] Help! Message-ID: <000301cd749c$9778d0d0$c66a7270$@com> Hello, I'm a student now using libvorbis in my project. I aim to record voice through APIs in winmm.lib in wav buffer, and than encode the raw data in wav buffer and save as ogg file. The wav buffer is offered in a pipeline scheme, and in order to save memory, when a wav buffer is full, I start a new thread to process encoding through libvorbis. Problem is, when wav buffer is full and encoding completes, I write the encoded buffer to an ogg file. But the ogg file is not continuous, that is to say, the encoded datas from different wav buffers has a gap that is clear enough to affect the performance of a recorded voice. So I want to ask that how to avoid the gap between two ogg steam that needed to write continuously in a ogg file. Thank you very much! -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/vorbis-dev/attachments/20120807/c3ec2a2e/attachment.htm From lists at eastcheap.org Tue Aug 7 19:44:29 2012 From: lists at eastcheap.org (R.L. Horn) Date: Tue, 7 Aug 2012 21:44:29 -0500 (CDT) Subject: [Vorbis-dev] Help! In-Reply-To: <000301cd749c$9778d0d0$c66a7270$@com> References: <000301cd749c$9778d0d0$c66a7270$@com> Message-ID: On Tue, 7 Aug 2012, Liu Rui wrote: > So I want to ask that how to avoid the gap between two ogg steam that > needed to write continuously in a ogg file. Vorbis streams are, to all intents and purposes, gapless. I suspect that any gaps (i.e. unwanted silences) between streams are either present in the PCM data presented to the encoder, or you're failing to provide vorbis_analysis_wrote() with a zero-length chunk of audio to indicate EOS. Or, it's a playback problem. The closest thing I've experienced to what you've described is a minor, but audible, waveform discontinuity for quality values of around 3 or less, and that only in some pretty pathological cases.