[Vorbis] Block sizes

Neil Sluman neilsluman at yahoo.co.uk
Wed Feb 18 04:27:57 PST 2009


I’m developing an application that needs to record audio and also draw 
graphics at 30fps.  Using a 32kHz sample rate the vorbis decoder causes 
choppiness in the graphics because we will typically only do any 
compression roughly every 1/16 seconds (2048 sample window size) so we 
take just a little too long to process every second frame.

We have no preemptive multithreading but I can fix this problem by using 
the settings in ve_setup_22_uncoupled for 32Khz samples.  This results 
in a smaller window size and means I do some processing every frame.

* What are the trade-offs here?  It's spending a little more time doing 
the encoding but does this also affect quality?
* Is this the best way of doing this?
* Is it possible to have more control over the window sizes?  Just 
changing the numbers in blocksize_short and blocksize_long causes a 
crash so it's obviously more complex than that.



		
___________________________________________________________ 
Now you can scan emails quickly with a reading pane. Get the new Yahoo! Mail. http://uk.docs.yahoo.com/nowyoucan.html



More information about the Vorbis mailing list