mirror of
https://github.com/wader/fq.git
synced 2024-12-23 21:31:33 +03:00
Fix decoding of FLAC raw entropy partition
This commit is contained in:
parent
411c970093
commit
3f209c46ca
@ -2,9 +2,6 @@ package flac
|
||||
|
||||
// https://xiph.org/flac/format.html
|
||||
// https://wiki.hydrogenaud.io/index.php?title=FLAC_decoder_testbench
|
||||
// TODO:
|
||||
// 16 - Part 6 of Ladybug Castle (partition order 8 with escape codes)
|
||||
// 32 - Part 5 of The Four of Us Are Dying (partition order 8 with escape codes)
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
|
@ -463,7 +463,13 @@ func frameDecode(d *decode.D, in interface{}) interface{} {
|
||||
|
||||
if riceParameter == riceEscape {
|
||||
escapeSampleSize := int(d.FieldU5("escape_sample_size"))
|
||||
d.RangeFn(d.Pos(), int64(count*escapeSampleSize), func(d *decode.D) {
|
||||
d.FieldRawLen("samples", int64(count*escapeSampleSize))
|
||||
})
|
||||
for j := 0; j < count; j++ {
|
||||
samples[n] = d.S(escapeSampleSize)
|
||||
n++
|
||||
}
|
||||
} else {
|
||||
samplesStart := d.Pos()
|
||||
for j := 0; j < count; j++ {
|
||||
|
Loading…
Reference in New Issue
Block a user