This is the cl-out123 Reference Manual, version 1.0.0, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 04:19:11 2024 GMT+0.
The main system appears first, followed by any subsystem dependency.
cl-out123
Bindings to libout123, providing cross-platform audio output.
Yukari Hafner <shinmera@tymoon.eu>
Yukari Hafner <shinmera@tymoon.eu>
(GIT https://github.com/Shirakumo/cl-out123.git)
zlib
1.0.0
cffi
(system).
trivial-features
(system).
trivial-garbage
(system).
documentation-utils
(system).
bordeaux-threads
(system).
package.lisp
(file).
toolkit.lisp
(file).
conditions.lisp
(file).
low-level.lisp
(file).
wrapper.lisp
(file).
documentation.lisp
(file).
Files are sorted by type and then listed depth-first from the systems components trees.
cl-out123/cl-out123.asd
cl-out123/package.lisp
cl-out123/toolkit.lisp
cl-out123/conditions.lisp
cl-out123/low-level.lisp
cl-out123/wrapper.lisp
cl-out123/documentation.lisp
cl-out123/toolkit.lisp
package.lisp
(file).
cl-out123
(system).
device-default-name
(function).
with-error
(macro).
with-foreign-values
(macro).
with-generic-error
(macro).
cl-out123/conditions.lisp
toolkit.lisp
(file).
cl-out123
(system).
already-connected
(condition).
buffer-set-failed
(condition).
bytes
(reader method).
bytes
(reader method).
channels
(reader method).
connection-failed
(condition).
creation-failure
(condition).
device
(reader method).
driver
(reader method).
encoding
(reader method).
error-string
(reader method).
error-string-error
(condition).
failed-driver-info
(condition).
failed-driver-listing
(condition).
failed-format-listing
(condition).
failed-playback-format
(condition).
not-connected
(condition).
output
(reader method).
output-error
(condition).
playback-failed
(condition).
rate
(reader method).
start-failed
(condition).
cl-out123/low-level.lisp
conditions.lisp
(file).
cl-out123
(system).
*static*
(special variable).
buffered
(function).
close
(function).
continue
(function).
del
(function).
drain
(function).
driver-info
(function).
drivers
(function).
drop
(function).
enc-byname
(function).
enc-list
(function).
enc-longname
(function).
enc-name
(function).
encodings
(function).
encsize
(function).
errcode
(function).
fmt
(class).
fmt-channels
(function).
(setf fmt-channels)
(function).
fmt-encoding
(function).
(setf fmt-encoding)
(function).
fmt-rate
(function).
(setf fmt-rate)
(function).
formats
(function).
getformat
(function).
getparam
(function).
getparam-float
(function).
getparam-int
(function).
getparam-string
(function).
handle
(class).
ndrain
(function).
new
(function).
open
(function).
param
(function).
param-float
(function).
param-from
(function).
param-int
(function).
param-string
(function).
pause
(function).
plain-strerror
(function).
play
(function).
set-buffer
(function).
start
(function).
stop
(function).
strerror
(function).
*here*
(special variable).
samplesize
(function).
cl-out123/wrapper.lisp
low-level.lisp
(file).
cl-out123
(system).
buffered
(function).
(setf buffered)
(function).
channels
(reader method).
connect
(function).
connected
(reader method).
device
(reader method).
device-buffer
(reader method).
disconnect
(function).
drain
(function).
driver
(reader method).
driver-info
(function).
drivers
(function).
drop
(function).
encoding
(reader method).
encodings
(function).
formats
(function).
gain
(reader method).
handle
(reader method).
make-output
(function).
name
(reader method).
ndrain
(function).
output
(class).
output-to
(reader method).
pause
(function).
play
(function).
play-directly
(function).
playback-format
(function).
playing
(reader method).
preload
(reader method).
print-object
(method).
rate
(reader method).
reinitialize-instance
(method).
resume
(function).
shared-initialize
(method).
start
(function).
stop
(function).
with-playback
(macro).
check-connected
(function).
cthread
(reader method).
decode-encodings
(function).
dispose-handle
(function).
framesize
(reader method).
playback-lock
(reader method).
set-connected
(writer method).
set-playing
(writer method).
cl-out123/documentation.lisp
wrapper.lisp
(file).
cl-out123
(system).
Packages are listed by definition order.
cl-out123
org.shirakumo.fraf.out123
cffi
.
common-lisp
.
already-connected
(condition).
buffer-set-failed
(condition).
buffered
(function).
(setf buffered)
(function).
bytes
(generic reader).
channels
(generic reader).
connect
(function).
connected
(generic reader).
connection-failed
(condition).
creation-failure
(condition).
device
(generic reader).
device-buffer
(generic reader).
device-default-name
(function).
disconnect
(function).
drain
(function).
driver
(generic reader).
driver-info
(function).
drivers
(function).
drop
(function).
encoding
(generic reader).
encodings
(function).
error-string
(generic reader).
error-string-error
(condition).
failed-driver-info
(condition).
failed-driver-listing
(condition).
failed-format-listing
(condition).
failed-playback-format
(condition).
formats
(function).
gain
(generic reader).
handle
(generic reader).
make-output
(function).
name
(generic reader).
ndrain
(function).
not-connected
(condition).
output
(generic reader).
output
(class).
output-error
(condition).
output-to
(generic reader).
pause
(function).
play
(function).
play-directly
(function).
playback-failed
(condition).
playback-format
(function).
playing
(generic reader).
preload
(generic reader).
rate
(generic reader).
resume
(function).
start
(function).
start-failed
(condition).
stop
(function).
with-playback
(macro).
check-connected
(function).
cthread
(generic reader).
decode-encodings
(function).
dispose-handle
(function).
framesize
(generic reader).
playback-lock
(generic reader).
set-connected
(generic writer).
set-playing
(generic writer).
with-error
(macro).
with-foreign-values
(macro).
with-generic-error
(macro).
cl-out123-cffi
org.shirakumo.fraf.out123.cffi
cffi
.
common-lisp
.
*static*
(special variable).
buffered
(function).
close
(function).
continue
(function).
del
(function).
drain
(function).
driver-info
(function).
drivers
(function).
drop
(function).
enc-byname
(function).
enc-list
(function).
enc-longname
(function).
enc-name
(function).
encodings
(function).
encsize
(function).
errcode
(function).
fmt
(class).
fmt-channels
(function).
(setf fmt-channels)
(function).
fmt-encoding
(function).
(setf fmt-encoding)
(function).
fmt-rate
(function).
(setf fmt-rate)
(function).
formats
(function).
getformat
(function).
getparam
(function).
getparam-float
(function).
getparam-int
(function).
getparam-string
(function).
handle
(class).
ndrain
(function).
new
(function).
open
(function).
param
(function).
param-float
(function).
param-from
(function).
param-int
(function).
param-string
(function).
pause
(function).
plain-strerror
(function).
play
(function).
set-buffer
(function).
start
(function).
stop
(function).
strerror
(function).
*here*
(special variable).
samplesize
(function).
Definitions are sorted by export status, category, package, and then by lexicographic order.
Variable containing a pathname to the static directory.
Ensures a clean playback environment for the body.
First calls START with the given options, then evaluates the body
forms in an unwind-protect that calls STOP on exit.
See START
See STOP
Returns the number of bytes that currently reside in the internal buffer.
This number changes constantly as audio is played back.
This is setfable. Once set, a fork occurs to spawn a
"thread" to process the buffer in in the background.
See the <out123.h> file for more information.
See OUTPUT
Connects the output to the requested driver and device.
The output must not be connected already.
If the connection was successful, the output’s DRIVER and DEVICE
are updated to reflect the ones that were actually chosen by the
backend. This might differ from what you requested.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See OUTPUT
See DRIVER
See DEVICE
See CONNECTED
Attempts to return a somewhat sensible name to use for our application.
Disconnects the output from its driver and device.
If the output is already disconnected, this does nothing.
If there is still audio data to be played on the buffer, then this will block until it is finished. If you wish to abort immediately,
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
call DROP first.
See OUTPUT
See DROP
See CONNECTED
Blocks until all output in the buffer has been played back.
Implicitly resumes playback if it is paused first and then
pauses it again once it finishes.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See PLAYING
See OUTPUT
See NDRAIN
Returns the current driver and device the output uses, if any.
This might differ from DRIVER and DEVICE if the handle was not yet
CONNECTed, was connected by non-standard means, or something else
went wrong.
See OUTPUT
See CONNECT
Returns a list of drivers with their name and description.
You can use this to determine the available drivers and pick a suitable backend based on that.
See OUTPUT
Drops all remaining output from the internal buffers.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See OUTPUT
Returns a list of the possible encodings for the output rate and channel count you specified.
The output must be connected and will be stopped if it is playing.
See OTUPUT
Returns a list of possible formats for the requested rates and channels.
RATES should be a list of integers.
The output must be connected and will be stopped if it is playing.
Each item in the list is a plist with :RATE, :CHANNELS, and :ENCODINGS as keys.
Blocks until either all or bytes number of bytes have been played back.
Implictly resumes playback if it is paused first and then
pauses it again if there are no remaining bytes to be played
back.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See PLAYING
See OUTPUT
See DRAIN
Pauses playback.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See OUTPUT
See PLAYING
Send the octet-vector or array-pointer to out123 to be played back on the output.
If you need low latency, then this is definitely not the
function for you. The buffer is converted into a foreign
byte array before being sent off.
Returns the number of bytes that were actually played back.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See PLAY-DIRECTLY
See OUTPUT
Directly sends the given buffer to out123 to be played back on the output.
BUFFER must be a pointer to a foreign byte array of at least
BYTES size. Returns the number of bytes that were actually
played back.
This does not catch errors. If you need to check for errors,
see CL-OUT123-CFFI:ERRCODE.
This does not care for synchronisation or mutual exclusion.
If you call this simultaneously from multiple threads, things
/will/ crash and burn horribly.
See CL-OUT123-CFFI:ERRCODE
See HANDLE
See OUTPUT
Returns the current rate, channels, encoding, and framesize used by the output, if any.
This might differ from RATE, CHANNELS, ENCODING, and FRAMESIZE
if the handle has not yet been STARTed, was started by
non-standard means, or something else went wrong.
See OUTPUT
See START
Resumes playback.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See OUTPUT
See PLAYING
Starts playback to the connected output.
The output must be connected and must not have been started before.
If the start was successful, the output’s RATE, CHANNELS, ENCODING, and FRAMESIZE are updated to reflect the values that were actually chosen by the backend. This might differ from what you requested.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See OUTPUT
See RATE
See CHANNELS
See ENCODING
See FRAMESIZE
See PLAYING
Stops playback.
If there is still audio data to be played on the buffer, then this
will block until it is finished. If you wish to abort immediately,
call DROP first.
This function is safe to be called from multiple threads,
as it will mutually exclude them through a lock.
See OUTPUT
See PLAYING
buffer-set-failed
)) ¶playback-failed
)) ¶Returns the number of audio channels the backend uses to process the buffer data.
Can be set as an initarg on the output.
See OUTPUT
See START
output
)) ¶automatically generated reader method
start-failed
)) ¶Returns T if the output is connected to a device.
Returns the string naming the device used to play back sound or NIL if unknown.
Can be set as an initarg on the output.
See OUTPUT
See CONNECT
connection-failed
)) ¶Returns the number of seconds that the device buffer should hold.
Can be set as an initarg on the output.
Allowed values are:
T for the default that the backend will choose for itself.
REAL for the approximate amount of seconds of buffering. Should
not be more than 0.5.
See OUTPUT
Returns the string naming the driver used to play back sound or NIL if unknown.
Can be set as an initarg on the output.
In order to get a listing of all possible drivers, see DRIVERS.
See OUTPUT
See DRIVERS
See CONNECT
connection-failed
)) ¶Returns the encoding the backend uses to decode the buffer data.
Can be set as an initarg on the output.
See ENCODINGS for a list of possible encodings.
See OUTPUT
See START
See ENCODINGS
output
)) ¶automatically generated reader method
start-failed
)) ¶Returns the error string from the out123 library for the error we encountered.
See ERROR-STRING-ERROR
error-string-error
)) ¶Returns an integer representing the output device gain. This is driver-specific.
Can be set as an initarg on the output.
See OUTPUT
Returns the pointer to the actual handle object that the output object encapsulates.
You should not need this unless you are working with the internals of the library.
See OUTPUT
Returns the name used to identify the output in the audio playback device, if permitted.
Can be set as an initarg on the otuput.
The default value is calculated by DEVICE-DEFAULT-NAME
See OUTPUT
See DEVICE-DEFAULT-NAME
Returns the output object associated with the condition.
See OUTPUT-ERROR
output-error
)) ¶Returns a list of special flags that tell the backend (if possible) where to output to.
Can be set as an initarg on the output.
The flags in the list can be one of :HEADPHONES :INTERNAL-SPEAKER :LINE-OUT
See OUTPUT
Returns T if the output is currently playing audio.
Returns the percentage of data that is preloaded into the device buffer.
Can be set as an initarg on the output.
Allowed values are:
T for the default that the backend will choose for itself.
NIL for no preloading, aka 0.0.
REAL for the approximate fraction that should be preloaded [0,1].
See OUTPUT
Returns the sampling rate the backend uses to process the buffer data.
Can be set as an initarg on the output.
See OUTPUT
See START
Condition signalled if an attempt is made to connect again while the output is still connected.
See OUTPUT-ERROR
Condition signalled if the setting of the background buffer fails.
See ERROR-STRING-ERROR
See BYTES
Condition signalled if the connection of an output to its device fails.
See ERROR-STRING-ERROR
See DRIVER
See DEVICE
Condition signalled in the case the allocation of the output handler fails.
See OUTPUT-ERROR
Error condition superclass for errors that have an error-string from the out123 library.
See ERROR-STRING
See OUTPUT-ERROR
common-lisp
.
:error
This slot is read-only.
Condition signalled if the listing of available drivers fails for some reason.
See OUTPUT-ERROR
Condition signalled if the listing of available formats fails for some reason.
See OUTPUT-ERROR
Condition signalled if an operation is attempted that requires the output to be connected, but it isn’t.
See OUTPUT-ERROR
Error condition superclass for all errors related to this library.
See OUTPUT
error
.
Condition signalled if the playback of a buffer fails.
See ERROR-STRING-ERROR
See BYTES
Condition signalled if starting the device fails.
See ERROR-STRING-ERROR
See RATE
See CHANNELS
See ENCODING
foreign-struct-type
.
translatable-foreign-type
.
foreign-struct-type
.
translatable-foreign-type
.
Class representing an output to a sound playback device.
This holds all the necessary state and information in order to connect and
play back audio data to a device.
Some options can only be changed by closing and opening a new connection to
the backend. In order to do this, you can use REINITIALIZE-INSTANCE. It will
attempt to preserve state across reinitialisation, but pending sound data
will be disposed off immediately as to not block.
See HANDLE
See PLAYING
See CONNECTED
See DRIVER
See DEVICE
See RATE
See CHANNELS
See ENCODING
See OUTPUT-TO
See PRELOAD
See GAIN
See DEVICE-BUFFER
See NAME
See OUTPUT-LOCK
Initarg | Value |
---|---|
:driver | nil |
:device | nil |
:rate | 44100 |
:channels | 2 |
:encoding | int16 |
:output-to | nil |
:preload | t |
:gain | nil |
:device-buffer | t |
:name | (device-default-name) |
:device-buffer
This slot is read-only.
(cons (bordeaux-threads:current-thread) nil)
This slot is read-only.
(bordeaux-threads:make-lock "output lock")
This slot is read-only.
Variable containing the path to this very file, hopefully.
Checks the result of FORM against an error and if found, signals a condition according to the spec.
Same as CFFI:WITH-FOREIGN-OBJECTS, but resolves the bindings at the end and returns them as values.
Signals a simple-error if the result of FORM is an error.
See WITH-ERROR
Signals an error if the output is not connected.
See OUTPUT
See CONNECTED
See NOT-CONNECTED
Decodes the ORed together encodings into a list of keywords.
Properly disposes of the handle as quickly as possible.
Performs three steps if the handle is not a null-pointer:
Output is drained by DRAIN, the handle is CLOSEd, and finally DELeted.
See CL-OUT123-CFFI:DRAIN
See CL-OUT123-CFFI:CLOSE
See CL-OUT123-CFFI:DEL
Returns the framesize the backend uses to decode the buffer data.
This is determined automatically by the backend once the output
has STARTed.
See OUTPUT
See START
Jump to: | (
B C D E F G H M N O P R S W |
---|
Jump to: | (
B C D E F G H M N O P R S W |
---|
Jump to: | *
B C D E F G H N O P R S |
---|
Jump to: | *
B C D E F G H N O P R S |
---|
Jump to: | A B C D E F H L N O P S T W |
---|
Jump to: | A B C D E F H L N O P S T W |
---|