Handbook
Glossary
read-aiff-chunks ( -- comm ssnd )
Vocabulary
audio
.
aiff
Inputs
None
Outputs
comm
an
object
ssnd
an
object
Definition
USING:
audio.chunked-file
classes.struct
combinators
combinators.short-circuit
kernel
;
IN:
audio.aiff
::
read-aiff-chunks
( -- comm ssnd )
f
:>
comm!
f
:>
ssnd!
[
{
[
comm ssnd
and
not
]
[
read-chunk
]
}
0&&
]
[
{
{
[
dup
COMM-MAGIC
common-chunk
check-chunk
]
[
common-chunk
memory>struct
comm!
]
}
{
[
dup
SSND-MAGIC
sound-data-chunk
check-chunk
]
[
sound-data-chunk
memory>struct
ssnd!
]
}
[
drop
]
}
cond
]
while*
comm ssnd
2dup
and
[
invalid-audio-file
]
unless
;