cl vorbis
1.0.0Bindings to stb_vorbis, a simple and free OGG/Vorbis decoding library
About
This is a small library wrapping stb_vorbis to provide a fast, libre, and easy-to-ship OGG/Vorbis decoder.
How To
For this tutorial we assume that org.shirakumo.fraf.vorbis
has a local nickname of vorbis
.
(vorbis:with-file (file "test.ogg")
(values (vorbis:channels file)
(vorbis:samplerate file)
(vorbis:decode-frame file)))
There's functions to decode a full frame (decode-frame
), return the pointers to a decoded frame (decode-frame-ptrs
), decode samples to a list of buffers (decode
), and decode to an interleaved buffer (decode-interleaved
).
If need-be, you can also access the underlying C functions directly through the org.shirakumo.vorbis.cffi
package and the handle
function.
Pinnable Vectors
Where mentioned, a "pinnable vector" must be either a vector allocated through static-vectors
, or on SBCL a vector of type sb-kernel:simple-unboxed-array
.
Included Sources
System Information
Definition Index
-
ORG.SHIRAKUMO.FRAF.VORBIS
No documentation provided.-
EXTERNAL CONDITION NEED-MORE-DATA
Warning signalled when not enough data is available to complete the operation.
-
EXTERNAL CONDITION VORBIS-ERROR
Error signalled when a vorbis operation fails. See CODE
-
EXTERNAL STRUCTURE FILE
Representation of an OGG/Vorbis file. See OPEN See HANDLE See CHANNELS See SAMPLERATE See MAX-FRAME-SIZE See CLOSE See FILE-OFFSET See SAMPLE-INDEX See COMMENTS See VENDOR See SEEK See SEEK-FRAME See SAMPLE-COUNT See DURATION See DECODE-FRAME See DECODE-FRAME-PTRS See DECODE See DECODE-INTERLEAVED
-
EXTERNAL FUNCTION CHANNELS
- INSTANCE
Returns the number of channels in the file. See FILE
-
EXTERNAL FUNCTION CLOSE
- FILE
Closes the file and invalidates its handle. See FILE
-
EXTERNAL FUNCTION COMMENTS
- FILE
Returns a list of comments as strings embedded in the vorbis file. See FILE
-
EXTERNAL FUNCTION DECODE
- FILE
- BUFFERS
- &KEY
- START
- END
Decode a number of samples to per-channel buffers. BUFFERS must be a list of pinnable vectors that will be filled with samples, each starting by START and ending before END. Returns the number of samples that were written to the buffers. See FILE See DECODE-INTERLEAVED
-
EXTERNAL FUNCTION DECODE-FRAME
- FILE
- &OPTIONAL
- BUFFERS
Decode a whole vorbis frame. Returns three values: a list of buffers (one per channel) containaing the frame data, the number of samples in the buffers, and the number of channels. If BUFFERS is passed it must be a list of pinnable vectors the length of the number of channels in the file. See FILE See DECODE-FRAME-PTRS
-
EXTERNAL FUNCTION DECODE-FRAME-PTRS
- FILE
Decode a whole vorbis frame. Returns three values: a pointer to an array of pointers for the buffers containing the samples, the number of samples in each buffer, and the number of channels. See FILE See DECODE-FRAME
-
EXTERNAL FUNCTION DECODE-INTERLEAVED
- FILE
- BUFFER
- &KEY
- START
- END
-
EXTERNAL FUNCTION DURATION
- FILE
Returns the length of the vorbis file in seconds. See FILE
-
EXTERNAL FUNCTION FILE-OFFSET
- FILE
Returns the current seek point within the file or memory region. See FILE
-
EXTERNAL FUNCTION HANDLE
- INSTANCE
Returns the pointer to the underlying C handle. See FILE
-
EXTERNAL FUNCTION (SETF HANDLE)
- VALUE
- INSTANCE
No documentation provided. -
EXTERNAL FUNCTION INIT
Load the foreign library. Automatically called by OPEN.
-
EXTERNAL FUNCTION MAX-FRAME-SIZE
- INSTANCE
Returns the maximum size of a frame in bytes. See FILE
-
EXTERNAL FUNCTION OPEN
- THING
- &REST
- INITARGS
- &KEY
- BUFFER
- START
- END
Opens the given input as an OGG/Vorbis file. Returns the newly generated FILE object or signals an error. The input can be a STRING/PATHNAME, a CFFI:FOREIGN-POINTER, or an UNSIGNED-BYTE 8 static vector. If you pass a vector that is not pinned in memory, bad things will happen. This function automatically calls INIT to ensure the library is loaded. See OPEN-FILE See OPEN-POINTER See OPEN-VECTOR See FILE See VORBIS-ERROR
-
EXTERNAL FUNCTION OPEN-FILE
- PATH
- &KEY
- BUFFER
-
EXTERNAL FUNCTION OPEN-POINTER
- MEMORY
- LENGTH
- &KEY
- BUFFER
-
EXTERNAL FUNCTION OPEN-VECTOR
- VECTOR
- &KEY
- BUFFER
- START
- END
-
EXTERNAL FUNCTION SAMPLE-COUNT
- FILE
Returns the number of samples total in the vorbis file. See FILE
-
EXTERNAL FUNCTION SAMPLE-INDEX
- FILE
-
EXTERNAL FUNCTION (SETF SAMPLE-INDEX)
- INDEX
- FILE
No documentation provided. -
EXTERNAL FUNCTION SAMPLERATE
- INSTANCE
Returns the sample rate of the audio data in the file. See FILE
-
EXTERNAL FUNCTION SEEK
- FILE
- SAMPLE
Seek to the given sample in the vorbis file. See FILE See SEEK-FRAME
-
EXTERNAL FUNCTION SEEK-FRAME
- FILE
- SAMPLE
-
EXTERNAL FUNCTION VENDOR
- FILE
Returns the name of the vendor that produced the vorbis file. See FILE
-
EXTERNAL GENERIC-FUNCTION CODE
- CONDITION
Returns the internal error code that produced the error. See VORBIS-ERROR
-
EXTERNAL MACRO WITH-FILE
- FILE
- INPUT
- &REST
- ARGS
- &BODY
- BODY
-
EXTERNAL SOURCE-TRANSFORM CHANNELS
No documentation provided. -
EXTERNAL SOURCE-TRANSFORM (SETF CHANNELS)
No documentation provided. -
EXTERNAL SOURCE-TRANSFORM HANDLE
No documentation provided. -
EXTERNAL SOURCE-TRANSFORM (SETF HANDLE)
No documentation provided. -
EXTERNAL SOURCE-TRANSFORM MAX-FRAME-SIZE
No documentation provided. -
EXTERNAL SOURCE-TRANSFORM (SETF MAX-FRAME-SIZE)
No documentation provided. -
EXTERNAL SOURCE-TRANSFORM SAMPLERATE
No documentation provided. -
EXTERNAL SOURCE-TRANSFORM (SETF SAMPLERATE)
No documentation provided.
-
-
ORG.SHIRAKUMO.FRAF.VORBIS.CFFI
No documentation provided.-
EXTERNAL CLASS BUFFER
No documentation provided. -
EXTERNAL CLASS COMMENT
No documentation provided. -
EXTERNAL CLASS INFO
No documentation provided. -
EXTERNAL FUNCTION BUFFER-DATA
- POINTER-TO-BUFFER
No documentation provided. -
EXTERNAL FUNCTION (SETF BUFFER-DATA)
- VALUE
- POINTER-TO-BUFFER
No documentation provided. -
EXTERNAL FUNCTION BUFFER-LENGTH
- POINTER-TO-BUFFER
No documentation provided. -
EXTERNAL FUNCTION (SETF BUFFER-LENGTH)
- VALUE
- POINTER-TO-BUFFER
No documentation provided. -
EXTERNAL FUNCTION CLOSE
- VORBIS
No documentation provided. -
EXTERNAL FUNCTION COMMENT-LIST
- POINTER-TO-COMMENT
No documentation provided. -
EXTERNAL FUNCTION (SETF COMMENT-LIST)
- VALUE
- POINTER-TO-COMMENT
No documentation provided. -
EXTERNAL FUNCTION COMMENT-LIST-LENGTH
- POINTER-TO-COMMENT
No documentation provided. -
EXTERNAL FUNCTION (SETF COMMENT-LIST-LENGTH)
- VALUE
- POINTER-TO-COMMENT
No documentation provided. -
EXTERNAL FUNCTION COMMENT-VENDOR
- POINTER-TO-COMMENT
No documentation provided. -
EXTERNAL FUNCTION (SETF COMMENT-VENDOR)
- VALUE
- POINTER-TO-COMMENT
No documentation provided. -
EXTERNAL FUNCTION DECODE-FILENAME
- FILENAME
- CHANNELS
- SAMPLERATE
- OUTPUT
No documentation provided. -
EXTERNAL FUNCTION DECODE-FRAME-PUSHDATA
- VORBIS
- DATABLOCK
- LENGTH
- CHANNELS
- OUTPUT
- SAMPLES
No documentation provided. -
EXTERNAL FUNCTION DECODE-MEMORY
- MEM
- LENGTH
- CHANNELS
- SAMPLERATE
- OUTPUT
No documentation provided. -
EXTERNAL FUNCTION FLUSH-PUSHDATA
- VORBIS
No documentation provided. -
EXTERNAL FUNCTION GET-COMMENT
- VORBIS
- COMMENT
No documentation provided. -
EXTERNAL FUNCTION GET-ERROR
- VORBIS
No documentation provided. -
EXTERNAL FUNCTION GET-FILE-OFFSET
- VORBIS
No documentation provided. -
EXTERNAL FUNCTION GET-FRAME-FLOAT
- VORBIS
- CHANNELS
- OUTPUT
No documentation provided. -
EXTERNAL FUNCTION GET-FRAME-SHORT
- VORBIS
- CHANNEL
- BUFFERS
- LENGTH
No documentation provided. -
EXTERNAL FUNCTION GET-FRAME-SHORT-INTERLEAVED
- VORBIS
- CHANNEL
- BUFFER
- LENGTH
No documentation provided. -
EXTERNAL FUNCTION GET-INFO
- VORBIS
- INFO
No documentation provided. -
EXTERNAL FUNCTION GET-SAMPLE-OFFSET
- VORBIS
No documentation provided. -
EXTERNAL FUNCTION GET-SAMPLES-FLOAT
- VORBIS
- CHANNELS
- BUFFERS
- LENGTH
No documentation provided. -
EXTERNAL FUNCTION GET-SAMPLES-FLOAT-INTERLEAVED
- VORBIS
- CHANNELS
- BUFFER
- LENGTH
No documentation provided. -
EXTERNAL FUNCTION GET-SAMPLES-SHORT
- VORBIS
- CHANNELS
- BUFFERS
- LENGTH
No documentation provided. -
EXTERNAL FUNCTION GET-SAMPLES-SHORT-INTERLEAVED
- VORBIS
- CHANNELS
- BUFFER
- LENGTH
No documentation provided. -
EXTERNAL FUNCTION INFO-CHANNELS
- POINTER-TO-INFO
No documentation provided. -
EXTERNAL FUNCTION (SETF INFO-CHANNELS)
- VALUE
- POINTER-TO-INFO
No documentation provided. -
EXTERNAL FUNCTION INFO-MAX-FRAME-SIZE
- POINTER-TO-INFO
No documentation provided. -
EXTERNAL FUNCTION (SETF INFO-MAX-FRAME-SIZE)
- VALUE
- POINTER-TO-INFO
No documentation provided. -
EXTERNAL FUNCTION INFO-SAMPLERATE
- POINTER-TO-INFO
No documentation provided. -
EXTERNAL FUNCTION (SETF INFO-SAMPLERATE)
- VALUE
- POINTER-TO-INFO
No documentation provided. -
EXTERNAL FUNCTION INFO-SETUP-MEMORY-REQUIRED
- POINTER-TO-INFO
No documentation provided. -
EXTERNAL FUNCTION (SETF INFO-SETUP-MEMORY-REQUIRED)
- VALUE
- POINTER-TO-INFO
No documentation provided. -
EXTERNAL FUNCTION INFO-SETUP-TEMP-MEMORY-REQUIRED
- POINTER-TO-INFO
No documentation provided. -
EXTERNAL FUNCTION (SETF INFO-SETUP-TEMP-MEMORY-REQUIRED)
- VALUE
- POINTER-TO-INFO
No documentation provided. -
EXTERNAL FUNCTION INFO-TEMP-MEMORY-REQUIRED
- POINTER-TO-INFO
No documentation provided. -
EXTERNAL FUNCTION (SETF INFO-TEMP-MEMORY-REQUIRED)
- VALUE
- POINTER-TO-INFO
No documentation provided. -
EXTERNAL FUNCTION OPEN-FILE
- FILE
- CLOSE-HANDLE-ON-CLOSE
- ERROR
- BUFFER
No documentation provided. -
EXTERNAL FUNCTION OPEN-FILE-SECTION
- FILE
- CLOSE-HANDLE-ON-CLOSE
- ERROR
- BUFFER
- LENGTH
No documentation provided. -
EXTERNAL FUNCTION OPEN-FILENAME
- FILENAME
- ERROR
- BUFFER
No documentation provided. -
EXTERNAL FUNCTION OPEN-MEMORY
- DATA
- LENGTH
- ERROR
- BUFFER
No documentation provided. -
EXTERNAL FUNCTION OPEN-PUSHDATA
- DATABLOCK
- LENGTH
- CONSUMED
- ERROR
- BUFFER
No documentation provided. -
EXTERNAL FUNCTION SEEK
- VORBIS
- SAMPLE
No documentation provided. -
EXTERNAL FUNCTION SEEK-FRAME
- VORBIS
- SAMPLE
No documentation provided. -
EXTERNAL FUNCTION SEEK-START
- VORBIS
No documentation provided. -
EXTERNAL FUNCTION STREAM-LENGTH-IN-SAMPLES
- VORBIS
No documentation provided. -
EXTERNAL FUNCTION STREAM-LENGTH-IN-SECONDS
- VORBIS
No documentation provided.
-