mirror of
https://github.com/wader/fq.git
synced 2024-12-23 13:22:58 +03:00
Merge pull request #379 from ktmf01/fix-flac-raw-partition
Fix decoding of FLAC raw entropy partition
This commit is contained in:
commit
b6c4c27688
@ -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"
|
||||
|
@ -455,7 +455,13 @@ func frameDecode(d *decode.D, in any) any {
|
||||
|
||||
if riceParameter == riceEscape {
|
||||
escapeSampleSize := int(d.FieldU5("escape_sample_size"))
|
||||
d.FieldRawLen("samples", int64(count*escapeSampleSize))
|
||||
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