Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ ALsetwidth(3dm) — IRIX 6.5.3f

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ALnewconfig(3dm)

ALgetconfig(3dm)

ALopenport(3dm)

ALsetconfig(3dm)

oserror(3C)



ALgetwidth(3dm)                                                ALgetwidth(3dm)



NAME
     ALsetwidth, ALgetwidth - (obsolete) get/set the sample width setting in
     an audio ALconfig structure

SYNOPSIS
     #include <dmedia/audio.h>

     long ALgetwidth(ALconfig config)

     int ALsetwidth(ALconfig config, long samplesize)

PARAMETER
     config       expects an ALconfig structure, the returned value of a call
                  to ALnewconfig(3dm) or ALgetconfig(3dm).

     samplesize   expects a symbolic constant that identifies the size of an
                  audio sample.  There are three symbolic constants defined
                  for this parameter.

                  ALSAMPLE8 indicates a one byte sample width in the range
                  -128 to 127.

                  ALSAMPLE16 indicates a two byte sample width in the range
                  -32768 to 32767.

                  ALSAMPLE24 indicates a 4 byte sample width in the range
                  -8388608 to 8388607.

DESCRIPTION
     ALsetwidth and ALgetwidth are obsolete and are provided for backward
     compatibility. The preferred functions are alSetWidth(3dm) and
     alGetWidth(3dm).

     ALsetwidth(3dm) sets the sample width setting in the ALconfig structure
     config.  Any audio port that you then configure using config will have
     the audio sample size you specify with samplesize.

     ALsetwidth(3dm) can fail for the following reasons:

     ALBADCONFIG   config is invalid or null.

     ALBADWIDTH    width is not one of the valid constants listed above.

     ALgetwidth(3dm) returns the current sample width setting in the ALconfig
     structure config.

     ALgetwidth(3dm) can fail for the following reason:

     ALBADCONFIG    config is invalid or null.






                                                                        Page 1





ALgetwidth(3dm)                                                ALgetwidth(3dm)



     Both ALgetwidth(3dm) and ALsetwidth(3dm) are meaningful if you are using
     the two's complement sample format (the default). If you are using
     floating point data (see ALsetsampfmt(3dm)), calls to ALsetwidth(3dm)
     will not affect the behavior of ALreadsamps(3dm) or ALwritesamps(3dm)
     until you switch to two's complement sample format.

DIAGNOSTICS
     Upon successful completion ALgetwidth(3dm) returns a long whose value is
     one of the symbolic constants described above for samplesize. Otherwise,
     ALgetwidth(3dm) returns -1 and and sets an error number. This error
     number can be retrieved with oserror(3C).

     ALsetwidth(3dm) returns 0 to the calling process when successful.
     Otherwise, it returns -1 and sets an error number as described above.

SEE ALSO
     ALnewconfig(3dm), ALgetconfig(3dm), ALopenport(3dm), ALsetconfig(3dm),
     oserror(3C)





































                                                                        Page 2



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