Handbook
Glossary
write-pcm-to-buffer ( vorbis-stream offset pcm len -- offset' )
Vocabulary
audio
.
vorbis
.
private
Inputs
vorbis-stream
an
object
offset
an
object
pcm
an
object
len
an
object
Outputs
offset'
an
object
Definition
USING:
accessors
alien.c-types
alien.data
kernel
math
math.order
ogg.vorbis
sequences
specialized-vectors.instances.alien.c-types.short
;
IN:
audio.vorbis.private
::
write-pcm-to-buffer
( vorbis-stream offset pcm len -- offset' )
vorbis-stream
buffer>>
:>
buffer buffer
length
-1
shift
:>
buffer-length offset -1
shift
:>
sample-offset buffer buffer-length
short
<c-direct-array>
sample-offset
short-vector
boa
:>
short-buffer vorbis-stream
info>>
channels>>
:>
#channels
buffer-length sample-offset
-
#channels
/i
:>
max-len len max-len
min
:>
len' pcm #channels
void*
<c-direct-array>
:>
channel*s len'
<iota>
[|
sample |
#channels
<iota>
[|
channel |
channel channel*s
nth
len
float
<c-direct-array>
sample
swap
nth
float>short-sample
short-buffer
push
]
each
]
each
vorbis-stream
dsp-state>>
len'
vorbis_synthesis_read
drop
short-buffer
length
1
shift
;
inline