Unit Audio

From Ultibo.org
Revision as of 03:38, 19 June 2017 by Ultibo (Talk | contribs)

Jump to: navigation, search

Return to Unit Reference


Description


Ultibo Audio interface unit

This unit provides both the Audio device interface and the generic USB audio device driver.

Constants



Audio specific constants AUDIO_*
AUDIO_NAME_PREFIX = 'Audio'; Name prefix for Audio Devices


Audio device types AUDIO_TYPE_*
AUDIO_TYPE_NONE = 0;  


Audio device states AUDIO_STATE_*
AUDIO_STATE_DISABLED = 0;  
AUDIO_STATE_ENABLED = 1;  


Audio device flags AUDIO_FLAG_*
AUDIO_FLAG_NONE = $00000000;  


Audio logging AUDIO_LOG_*
AUDIO_LOG_LEVEL_DEBUG = LOG_LEVEL_DEBUG; Audio debugging messages
AUDIO_LOG_LEVEL_INFO = LOG_LEVEL_INFO; Audio informational messages, such as a device being attached or detached
AUDIO_LOG_LEVEL_ERROR = LOG_LEVEL_ERROR; Audio error messages
AUDIO_LOG_LEVEL_NONE = LOG_LEVEL_NONE; No Audio messages


Type definitions



Audio properties

PAudioProperties = ^TAudioProperties;

TAudioProperties = record

Flags:LongWord; Device flags (eg AUDIO_FLAG_????)

Audio enumeration callback

TAudioEnumerate = function(Audio:PAudioDevice; Data:Pointer):LongWord;

Audio notification callback

TAudioNotification = function(Device:PDevice; Data:Pointer; Notification:LongWord):LongWord;

Audio device get properties

TAudioDeviceGetProperties = function(Audio:PAudioDevice; Properties:PAudioProperties):LongWord;

Audio device

PAudioDevice = ^TAudioDevice;

TAudioDevice = record

Device Properties
Device:TDevice; The Device entry for this Audio device
Audio Properties
AudioId:LongWord; Unique Id of this Audio device in the Audio device table
AudioState:LongWord; Audio device state (eg AUDIO_STATE_ENABLED)
DeviceGetProperties:TAudioDeviceGetProperties; A Device specific DeviceGetProperties method implementing the standard Audio device interface (Or nil if the default method is suitable)
Driver Properties
Lock:TMutexHandle; Device lock
Properties:TAudioProperties; Device properties
Internal Properties
Prev:PAudioDevice; Previous entry in Audio device table
Next:PAudioDevice; Next entry in Audio device table


Public variables


To be documented

Function declarations


To be documented


Return to Unit Reference