File tree 1 file changed +13
-5
lines changed
1 file changed +13
-5
lines changed Original file line number Diff line number Diff line change @@ -44,14 +44,14 @@ register-codec [
44
44
data: copy []
45
45
chunks: copy []
46
46
47
- while [not tail ? bin/buffer ][
47
+ while [8 < length ? bin/buffer ][
48
48
binary/read bin [
49
49
id: BYTES 4
50
50
size: UI32LE
51
51
starts: INDEX
52
52
]
53
53
ends: starts + size
54
- chunk: any [ try [to tag! id] id ]
54
+ chunk: any [ attempt [to tag! id] id ]
55
55
if verbose > 0 [
56
56
printf [
57
57
$32
@@ -112,7 +112,7 @@ register-codec [
112
112
]
113
113
<cue > [
114
114
count: binary/read bin 'UI32LE
115
- append chunks cues: copy []
115
+ append /only chunks cues: copy []
116
116
loop count [
117
117
binary/read/into bin [
118
118
UI32LE ; id - unique identification value
@@ -151,7 +151,15 @@ register-codec [
151
151
channels: (format/2 )
152
152
bits: (format/6 )
153
153
chunks: (chunks)
154
- data: (either empty? data [none][make vector! reduce ['integer! format/6 rejoin data]])
154
+ data: (
155
+ case [
156
+ empty? data [none]
157
+ ; we don't have 24bit integer vectors
158
+ find [8 16 32 ] format/6 [make vector! reduce ['integer! format/6 rejoin data]]
159
+ ; so provide raw binary data only...
160
+ 'else data
161
+ ]
162
+ )
155
163
]
156
164
]
157
165
]
@@ -254,5 +262,5 @@ register-codec [
254
262
parse data [#{ 52494646 } 4 skip #{ 57415645 } to end]
255
263
]
256
264
257
- verbose: 0
265
+ verbose: 3
258
266
]
You can’t perform that action at this time.
0 commit comments