libAF(3)

NAME
libAF.a - Core AF Library

Header Files
#include <AF/AFlib.h>

Connection Management

AFAudioConn *AFOpenAudioConn (char *server)

void AFCloseAudioConn (AFAudioConn *aud)

int (*AFSynchronize) (AFAudioConn *aud, int onoff))()

int (*AFSetAfterFunction) (AFAudioConn *aud, int (*func)()))()

Audio Handling

ATime AFGetTime (AC ac)

ATime AFPlaySamples (AC ac, ATime startTime,
                        int nbytes, unsigned char *buf)

ATime AFRecordSamples (AC ac, ATime startTime, int nbytes,
                        unsigned char *buf, ABool block)

Audio Contexts

AC AFCreateAC (AFAudioConn *aud, ADevice device, unsigned long valuemask,
                        AFSetACAttributes *attributes)

void AFChangeACAttributes (AC ac, unsigned long valuemask,
                        AFSetACAttributes *attributes)

void AFFreeAC (AC ac)

Event Handling

int AFEventsQueued (AFAudioConn *aud, int mode)

int AFPending (AFAudioConn *aud)

void AFIfEvent (AFAudioConn *aud, AFEvent *event_return,
                        ABool (*predicate)(), char *arg)

ABool AFCheckIfEvent (AFAudioConn *aud, AFEvent *event_return,
                        ABool (*predicate), char *arg)

void AFPeekIfEvent (AFAudioConn *aud, AFEvent *event_return,
                        ABool (*predicate)(), char *arg)

void AFNextEvent (AFAudioConn *aud, AFEvent *event)

void AFSelectEvents (AC ac, long mask)

Telephone

AC AFCreatePhoneAC (AFAudioConn *aud, unsigned long valuemask,
                        AFSetACAttributes *attributes)

int AFDialPhone (AC ac, char *dialstring)

void AFHookSwitch (AC ac, int onoff)

void AFFlashHook (AC ac, int duration)

void AFQueryPhone (AC ac, int *hs_state, int *loop_state)

I/O Control

void AFEnableInput (AC ac, AMask mask, AMask *old_state, AMask *new_state)

void AFDisableInput (AC ac, AMask mask, AMask *old_state, AMask *new_state)

void AFEnableOutput (AC ac, AMask mask, AMask *old_state, AMask *new_state)

void AFDisableOutput ( AC ac, AMask mask, AMask *old_state,
                        AMask *new_state)

void AFEnablePassThrough (AC ac, ABool change, ABool *old_state,
                        ABool *new_state)

void AFDisablePassThrough (AC ac, ABool change, ABool *old_state,
                        ABool *new_state)

int AFQueryInputGain ( AC ac, int *min_input_gain, int *max_input_gain)

int AFQueryOutputGain ( AC ac, int *min_output_gain, int *max_output_gain)

void AFSetInputGain ( AC ac, int gain)

void AFSetOutputGain ( AC ac, int gain)

Access Control

void AFAddHost(AFAudioConn *aud, AFHostAddress *host)

void AFAddHosts(AFAudioConn *aud, AFHostAddress *hosts, int n)

AFHostAddress *AFListHosts(AFAudioConn *aud, int *nhosts_ret,
                        ABool *enabled_ret)

void AFRemoveHost(AFAudioConn *aud, AFHostAddress *host)

void AFRemoveHosts(AFAudioConn *aud, AFHostAddress *hosts, int n)

void AFSetAccessControl(AFAudioConn *aud, int mode)

void AFEnableAccessControl(AFAudioConn *aud)

void AFDisableAccessControl(AFAudioConn *aud)

Properties
int AFGetProperty(AC ac, AAtom property, long long_offset,
                    long long_length, ABool delete, AAtom req_type,
                    AAtom *actual_type_return, int *actual_format_return,
                    unsigned long *nitems_return,
                    unsigned long *bytes_after_return,
                    unsigned char **prop_return)

AAtom *AFListProperties(AC ac, int *num_prop_return)

AFChangeProperty(AC ac, AAtom property, AAtom type, int format,
                    int mode, unsigned char *data, int nelements)

AFDeleteProperty(AC ac, AAtom property)

AAtom AFInternAtom(AFAudioConn *aud, char *atom_name, ABool only_if_exists)

char *AFGetAtomName(AFAudioConn *aud, AAtom atom)

Error Handling

int (*AFSetErrorHandler) ((*handler)(AFAudioConn *aud,
                        AFErrorEvent *event))()

int (*AFSetIOErrorHandler) ((*handler)(AFAudioConn *aud))()

void AFGetErrorText (AFAudioConn *aud, int code, char *buffer, int nbytes)

void AFGetErrorDatabaseText (AFAudioConn *aud, char *name, char *type,
                        char *defaultp, char *buffer,
                        int nbytes)

Miscellaneous

char *AFAudioConnName (char *conn)

void AFFlush(AFAudioConn *aud)

void AFSync(AFAudioConn *aud, ABool discard)

void AFNoOp(AFAudioConn *aud)

AFDeviceDescriptor *AAudioDeviceDescriptor (AFAudioConn * aud,
                        int dev_index)

AFree(data)
     void *data;

SEE ALSO
libAFUtil(3), AF(1)
AFOpenAudioConn(3), AFCloseAudioConn(3), AFSynchronize(3)
AFSetAfterFunction(3), AFGetTime(3), AFPlaySamples(3)
AFRecordSamples(3), AFCreateAC(3), AFChangeACAttributes(3)
AFFreeAC(3), AFEventsQueued(3), AFPending(3)
AFIfEvent(3), AFCheckIfEvent(3), AFPeekIfEvent(3)
AFNextEvent(3), AFSelectEvents(3), AFCreatePhoneAC(3)
AFDialPhone(3), AFHookSwitch(3), AFFlashHook(3)
AFQueryPhone(3), AFEnableInput(3), AFDisableInput(3)
AFEnableOutput(3), AFDisableOutput(3), AFEnablePassThrough(3)
AFDisablePassThrough(3), AFQueryInputGain(3), AFQueryOutputGain(3)
AFSetInputGain(3), AFSetOutputGain(3), AFAddHost(3)
AFAddHosts(3), AFListHosts(3), AFRemoveHost(3)
AFRemoveHosts(3), AFSetAccessControl(3), AFEnableAccessControl(3)
AFDisableAccessControl(3), AFGetProperty(3), AFListProperties(3)
AFChangeProperty(3), AFDeleteProperty(3), AFInternAtom(3)
AFGetAtomName(3), AFSetErrorHandler(3), AFSetIOErrorHandler(3)
AFGetErrorText(3), AFGetErrorDatabaseText(3), AFAudioConnName(3)
AFFlush(3), AFSync(3), AFNoOp(3)
AAudioDeviceDescriptor(3), AFree(3)

BUGS
If you encounter a reproducible bug, please submit a problem report to (af-bugs@crl.dec.com).

COPYRIGHT
Copyright 1990-1994, Digital Equipment Corporation.
See AF(1) for a full statement of rights and permissions.

AUTHORS
Digital Cambridge Research Lab