Handbook
Glossary
generator-audio-format ( generator -- channels sample-bits sample-rate )
Audio playback engine
ยป
Audio generator protocol
Prev:
generate-audio ( generator -- c-ptr size )
Vocabulary
audio
.
engine
Inputs
generator
an object implementing the
Audio generator protocol
Outputs
channels
an
integer
sample-bits
an
integer
sample-rate
an
integer
Word description
Returns the number of channels (1 for mono, 2 for stereo), number of bits per sample, and sample rate in hertz of the PCM data generated by
generator
.
Definition
IN:
audio.engine
GENERIC:
generator-audio-format
( generator -- channels sample-bits sample-rate )
Methods
USING:
audio.engine
audio.engine.test
kernel
;
M:
noise-generator
generator-audio-format
drop
1 16 8000
;
USING:
accessors
audio.engine
audio.vorbis
kernel
;
M:
vorbis-stream
generator-audio-format
[
info>>
channels>>
]
[
drop
16
]
[
info>>
rate>>
]
tri
;