Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ALopenport(3dm) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ALcloseport(3dm)

ALnewconfig(3dm)

ALsetconfig(3dm)

ALqueryparams(3dm)

oserror(3C)



ALopenport(3dm)                                                ALopenport(3dm)



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:

     ALBADCONFIG          config is invalid.






                                                                        Page 1





ALopenport(3dm)                                                ALopenport(3dm)



     ALBADDIRECTION       direction is not valid.

     ALBADOUTOFMEM      insufficient memory is available to allocate the
                            ALport structure.

     ALBADDEVICEACCESS   audio hardware is inaccessible.

     ALBADNOPORTS        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)






































                                                                        Page 2



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