[ scummvm-Feature Requests-786569 ] Fix for codebook waste and resampling issues

SourceForge.net noreply at sourceforge.net
Mon Aug 11 13:19:29 CEST 2003


Feature Requests item #786569, was opened at 2003-08-11 11:19
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418823&aid=786569&group_id=37116

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Marten van Wezel (puntloos)
Assigned to: Nobody/Anonymous (nobody)
Summary: Fix for codebook waste and resampling issues

Initial Comment:
A detailed discussion thread about both issues is here:

http://sourceforge.net/forum/forum.php?
thread_id=912776&forum_id=115756

In a nutshell:

--- Codebook waste:
Every ogg file has a codebook of 4-12kbyte. On vorbis 
files of (say) 1 second of (say) 32kbps that would mean 
around 20% wasted space.

The way to fix this is to compile one huge source .wav 
file (or at least not one for every sample!) and encode 
this into one big vorbis file. After that all that's left is to 
implement some code to seek the right spot to play.

A useful side-effect is that people interested in the 
actual samples can just drag the resulting file into 
winamp and play. 

--- Resampling issue:
As I've come to understand it certain Lucasarts games 
use a strange frequency of 11111Hz instead of the usual 
11025. When fed to vorbis, vorbis resamples and 
encodes, and appearantly vorbis isn't very good at 
resampling. 2 solutions present themselves: 

1/ Use some other resampler before feeding the file to 
vorbis, Im sure there's opensource stuff out there.
2/ (my preferred solution). Just force/fake and write the 
temporary wav files as being 11025Hz. The result is that 
the samples will be played back sliiightly slower (0.7%) 
but unless this gives unfixable timing problems in the 
game I very strongly doubt anyone will notice. (or just 
make it optional, so the purists can choose to resample 
and lose a ton of quality :) )

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=418823&aid=786569&group_id=37116




More information about the Scummvm-tracker mailing list