ALopenport(3dm)

ALopenport - (obsolete) open an audio port

As shipped in IRIX 6.5.22. Unchanged since IRIX 6.5.

NAME
     ALopenport - (obsolete) open an audio port

SYNOPSIS
     #include <dmedia/audio.h>

     ALport ALopenport(char *name, char *direction, ALconfig config)

PARAMETER
     name        A port name is an ASCII string which summarizes the usage of
                 this port.  It is intended for human consumption, similar to
                 a window title.  Port names have a maximum length of 20
                 characters.

     direction   Use this parameter to identify whether the port is an input
                 or an output port.  Acceptable values are:

                 "r" configures the port for reading (input).

                 "w" configures the port for writing (output).

     config      Expects the ALconfig structure returned by ALnewconfig(3dm).
                 This structure contains information that ALopenport(3dm) uses
                 to configure the port.

                 Passing a null (0) structure for this parameter, yields a
                 port with the default configuration.

DESCRIPTION
     ALopenport is obsolete and is provided for backward compatibility. The
     preferred function is alOpenPort(3dm).

     ALopenport(3dm) allocates and initializes an ALport structure, creating a
     programmatic connection to the audio system.  You can open more than one
     port at a time, up to a limit imposed by the particular hardware
     configuration.

     The default port has a 100,000 sample stereo buffer, utilizing a 16-bit
     two's complement sample format.

     Upon opening, an input port immediately begins to fill with samples. You
     should remove samples from the port post haste, lest the sample queue
     overflow. Upon opening, an output port will attempt to remove samples
     from the sample queue. You should provide samples to the port with great
     alacrity or the sample queue will underflow.

     ALopenport can fail for the following reasons:

     AL_BAD_CONFIG          config is invalid.
     AL_BAD_DIRECTION       direction is not valid.

     AL_BAD_OUT_OF_MEM      insufficient memory is available to allocate the
                            ALport structure.

     AL_BAD_DEVICE_ACCESS   audio hardware is inaccessible.

     AL_BAD_NO_PORTS        no audio ports are currently available.

DIAGNOSTICS
     If successful, ALopenport(3dm) returns an ALport structure for the named
     port.  Otherwise, ALopenport(3dm) returns a null (0) valued structure and
     sets an error number; this error can be retrieved with oserror(3C).

SEE ALSO
     ALcloseport(3dm), ALnewconfig(3dm), ALsetconfig(3dm), ALqueryparams(3dm),
     oserror(3C)