[vorbis-dev] Delphi Header by Matthijs Laan vs RC3 = bitrates not working!

Michael Smith msmith at labyrinth.net.au
Mon Feb 11 00:51:13 PST 2002



>
>So... Would the API change discussed below be affecting me?
>I had assumed that the API was nearly finished and that backwards
>compatiblity wouldn't be broken.
>Did I assume incorrectly?

Minor API change with rc3 on encode-side, if you use managed modes (and
if you don't use a different initialisation function, you get a managed
mode).

There are two things you can do (you should do both).
Use "vorbis_encode_init_vbr()" instead of "vorbis_encode_init()" - this gets
you a full vbr mode instead of a managed bitrate mode (fully vbr is 
higher quality). You might want to make this optional - there are good
reasons to use managed modes sometimes, but you should default to vbr.

The second is the API change, which you need to make things work right - 
Instead of doing:
  vorbis_analysis(&vb, &op);
  ... handle output packet ...

Do:
  vorbis_analysis(&vb, NULL);
  vorbis_bitrate_addblock(&vb);

  while(vorbis_bitrate_flushpacket(&vd, &op) {
    ... handle output packet ...
  }

While this is obviously not in your language of choice, the conversion
should be reasonably obvious.

Michael

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'vorbis-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Vorbis-dev mailing list