I'm referring to the docs online at Xiph.org (www.xiph.org)
The documentation on FLAC__stream_encoder_set_compression_level states that the default compression level is 5, with these parameters set as a result:
| level | do mid-side stereo | loose mid-side stereo | apodization | max lpc order | qlp coeff precision | qlp coeff prec search | escape coding | exhaustive model search | min residual partition order | max residual partition order | rice parameter search dist |
|---|---|---|---|---|---|---|---|---|---|---|---|
| 5 | true | false | tukey(0.5) | 8 | 0 | false | false | false | 0 | 5 | 0 |
but if you look at the setter functions, the situation looks quite different:
| do mid-side stereo | loose mid-side stereo | apodization | max lpc order | qlp coeff precision | qlp coeff prec search | escape coding | exhaustive model search | min residual partition order | max residual partition order | rice parameter search dist |
|---|---|---|---|---|---|---|---|---|---|---|
| false | false | tukey(0.5) | 0 | 0 | false | false | false | 0 | 0 | 0 |
Reading the file src / libFLAC / stream_encoder.c one can see that FLAC__stream_encoder_new calls set_defaults which in turn calls FLAC__stream_encoder_set_compression_level at the end. So the documentation is inconsistent (self-conflicting) about these parameters:
In all three cases the default value in documentation should be the value set (overridden) by FLAC__stream_encoder_set_compression_level.
A patch which should fix this issue assuming that my explanation above was correct.
Patch applied. Thanks.
You seem familiar with Git. You can also submt PRs at https://github.com/xiph/flac/ .