alGetSampFmt(3dm)                                            alGetSampFmt(3dm)


NAME
     alGetSampFmt, alSetSampFmt - get/set the sample format setting in an
     audio ALconfig structure

SYNOPSIS
     #include <dmedia/audio.h>

     int alGetSampFmt(ALconfig config)

     int alSetSampFmt(ALconfig config, int sampleformat)

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

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

DESCRIPTION
     alSetSampFmt(3dm) sets the sample format in the ALconfig structure
     config.  Any audio port that you then configure using config will have
     the audio sample format you specify with sampleformat.

     ALconfig structure config.

     The currently defined set of sample formats found in audio.h are:

          AL_SAMPFMT_TWOSCOMP
               indicates linear PCM two's complement integer sample
               format. Width of the integer data is one of signed char,
               short, or int, as specified by the alSetWidth(3dm)
               function.
          AL_SAMPFMT_FLOAT
               indicates linear PCM IEEE 32-bit floating point
               sample format. With this format, the value given
               by alSetWidth(3dm) is ignored.
          AL_SAMPFMT_DOUBLE
               indicates linear PCM IEEE 64-bit floating
               point sample format. With this format, the value given
               by alSetWidth(3dm) is ignored.
          AL_AES_CHANNEL_STATUS
               indicates each 24-byte wide "sample" is a single channel
               of Channel Status subcode information as defined by the
               IEC-958 and AES3-1992 Digital Audio Interface specifications.
               With this format, the value given by alSetWidth(3dm)
               is ignored.
          AL_AES_USER
               indicates each 24-byte wide "sample" is a single channel
               of User subcode data as defined by the IEC-958 and
               AES3-1992 Digital Audio Interface specifications. With


              this format, the value given by alSetWidth(3dm)
               is ignored.
          AL_AES_VALIDITY
               indicates each 24-byte wide "sample" is a single channel
               of Validity data information as defined by the IEC-958
               and AES3-1992 Digital Audio Interface specifications.
               With this format, the value given by alSetWidth(3dm)
               is ignored.


DIAGNOSTICS
     Upon successful completion, alGetSampFmt(3dm) returns a int whose value
     is the same as one of the symbolic constants described above for
     sampleformat. Otherwise, alGetSampFmt(3dm) returns -1 and sets an error
     number which can be retrieved with oserror(3C).


     AL_BAD_CONFIG   config is invalid or null.

     Upon successful completion, alSetSampFmt(3dm) returns 0. Otherwise, -1 is
     returned and an error number is set as described above.

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

     AL_BAD_CONFIG    config is invalid or null.

     AL_BAD_SAMPFMT   sampleformat is not one of the accepted constants.


NOTES
     Only Octane, Onyx2, Origin and systems with the Professional PCI Digital
     Audio option card support subcode data streams. Although it is valid to
     set an ALconfig's sample format to a subcode format on systems other than
     these, it is alOpenPort(3dm) that ultimately determines the ALconfig's
     validity with respect to the device specified by alSetDevice(3dm).

     Subcode data bit ordering always puts subcode Byte 0, bit 0 in the most
     significant bit of Byte 0, thus allowing a big-endian bit shift operation
     to correspond to subcode data time shift.


SEE ALSO
     alNewConfig(3dm), alGetConfig(3dm), alOpenPort(3dm), alSetConfig(3dm),
     alSetFloatMax(3dm), alGetFloatMax(3dm), alSetDevice(3dm), oserror(3C)


                                                                        Page 2