Handbook
Glossary
(read-wav) ( -- audio )
Vocabulary
audio
.
wav
Inputs
None
Outputs
audio
an
object
Definition
USING:
accessors
alien
alien.data
audio
audio.chunked-file
endian
kernel
;
IN:
audio.wav
:
(read-wav)
( -- audio )
read-wav-chunks
[
[
num-channels>>
2
memory>byte-array
le>
]
[
bits-per-sample>>
2
memory>byte-array
le>
]
[
sample-rate>>
4
memory>byte-array
le>
]
tri
]
[
[
header>>
size>>
4
memory>byte-array
le>
dup
]
[
body>>
>c-ptr
]
bi
swap
memory>byte-array
]
bi*
<audio>
convert-data-endian
;