Handbook
Glossary
openal-format ( audio -- format )
Audio framework
Prev:
<audio> ( channels sample-bits sample-rate size data -- audio )
Vocabulary
audio
Inputs
audio
an
audio
Outputs
format
an ALenum value
Word description
Returns the OpenAL format value that corresponds to the format of the
audio
object. If the object's format doesn't match an OpenAL-supported format, a
format-unsupported-by-openal
error is thrown.
Definition
USING:
accessors
arrays
combinators
kernel
openal
;
IN:
audio
:
openal-format
( audio -- format )
dup
[
channels>>
]
[
sample-bits>>
]
bi
2array
{
{
{
1 8
}
[
drop
AL_FORMAT_MONO8
]
}
{
{
1 16
}
[
drop
AL_FORMAT_MONO16
]
}
{
{
2 8
}
[
drop
AL_FORMAT_STEREO8
]
}
{
{
2 16
}
[
drop
AL_FORMAT_STEREO16
]
}
[
drop
format-unsupported-by-openal
]
}
case
;