(github.com)
I like the code style, this is pretty nice C. It's refreshing to see human code.
https://www.xiph.org/vorbis/doc/Vorbis_I_spec.html#x1-470003
If you have the complete file you can calculate the optimal ones. In a streaming scenario that does not work and you have use something you think is good.