Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ASelectInpu(3X) — HP-UX ANSI C A.10.11

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ACheckEvent(3X)

ACheckMaskEvent(3X)

AEventsQueued(3X)

AMaskEvent(3X)

ANextEvent(3X)

APeekEvent(3X)

APutBackEvent(3X)

AQlength(3X)

ASelectInput(3X)

NAME

ASelectInput − request report of specified audio events

SYNOPSIS

void
ASelectInput (

Audio ∗  audio,

ATransID xid,

AEventMask event_mask,

long ∗  status_return );

DESCRIPTION

ASelectInput() requests the report of the audio events specified by the event mask. 

audio is the Audio structure associated with this connection. 

xid specifies the ID of the transaction whose events are of interest. 

event_mask specifies the events for which a report is requested; each bit in the mask corresponds to one type of audio event. The mask is the bitwise inclusive OR of one or more of the masks values listed in the Structures section. 

status_return receives the returned status of the operation, unless this parameter is passed in as a NULL pointer.  If status_return is set to NULL, Alib will do the error handling. 

STRUCTURES

The following are defined in /opt/audio/include/Alib.h:

typedef long      ATransID; /* Type for transaction ID. */
 typedef long                        AEventMask;
 #define ANoEventMask                0
#define AErrorMask                  ( 1 << AETError )
#define AConnectMask                ( 1 << AETConnect )
#define ATransStatusMask            ( 1 << AETTransStatus )
#define ATransStartedMask           ( 1 << AETTransStarted )
#define ATransCompletedMask         ( 1 << AETTransCompleted )
#define ATransStoppedMask           ( 1 << AETTransStopped )
#define ATransPausedMask            ( 1 << AETTransPaused )
#define ATransResumedMask           ( 1 << AETTransResumed )
#define ATransPreemptedMask         ( 1 << AETTransPreempted )
#define ALoopStartedMask            ( 1 << AETLoopStarted )
#define ALoopStoppedMask            ( 1 << AETLoopStopped )
#define ARecordMonitorMask          ( 1 << AETRecordMonitor )
#define APlayMonitorMask            ( 1 << AETPlayMonitor )
#define ARecordDataMask             ( 1 << AETRecordData )
#define ADataNeededMask             ( 1 << AETDataNeeded )
#define ADataAvailableMask          ( 1 << AETDataAvailable )
#define AGetDataMask                ( 1 << AETGetData )
#define ADisconnectMask             ( 1 << AETDisconnect )
#define AStereoRecordMonitorMask    ( 1 << AETStereoRecordMonitor )
#define AStereoPlayMonitorMask      ( 1 << AETStereoPlayMonitor )
#define AHookStateChangedMask       ( 1 << AETHookStateChanged )
#define AMediaModeChangedMask       ( 1 << AETMediaModeChanged )
#define ADTMFDetectedMask           ( 1 << AETDTMFDetected )
#define AIncomingRingDetectedMask   ( 1 << AETIncomingRingDetected )
#define AIncomingRingEndedMask      ( 1 << AETIncomingRingEnded )
#define AOutgoingRingDetectedMask   ( 1 << AETOutgoingRingDetected )
#define ACallerIDReceivedMask       ( 1 << AETCallerIDReceived )
#define ALineStateChangedMask       ( 1 << AETLineStateChanged )

ERRORS

If status_return is not set to NULL, it can return one of the following values:

0  AENoError No error - the call completed successfully. 

2  AEBadAudio The audio structure is invalid.  A pointer to a valid audio structure may be missing (use AOpenAudio() to get a valid pointer). 

3  AEBadValue The event_mask contains an incorrect value. 

EXAMPLE

The following example sets the event mask to request record monitor and transaction pause events, and sets up status to receive an error status. 

Audio ∗ audio;  /∗ audio connection ∗/

TransID xid;  /∗ transaction ID ∗/

AEventMask emask;  /∗ event mask ∗/

long status;  /∗ error status ∗/
.
.
.

/∗ request input event reports ∗/

emask = (AETRecordMonitor | AETransPaused);

ASelectInput(audio, xid, emask, &status);

NOTE

In order to ensure that the compiler finds the Audio Library (libAlib.sl) and the Alib.h header file, you must add the following switches:

-L /opt/audio/lib
-I/opt/audio/include

DEPENDENCIES

This function belongs to the Audio Library of functions that manage connections to an audio server.  The audio server must run on a system that has audio hardware. To find out whether or not your system has audio hardware, refer to Using the Audio Developer’s Kit or the online help for the Audio control panel.  For information about the audio capabilities of a particular system use the online example audioinfo.c. 

AUTHOR

ASelectInput() was developed by HP. 

SEE ALSO

ACheckEvent(3X), ACheckMaskEvent(3X), AEventsQueued(3X), AMaskEvent(3X), ANextEvent(3X), APeekEvent(3X), APutBackEvent(3X), AQlength(3X). 

Hewlett-Packard Company  —  Audio Library: February, 1995

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026