Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ agetsilence(3X) — HP-UX 9.03

Media Vault

Software Library

Restoration Projects

Artifacts Sought

AGetSilenceValue(3X)

NAME

AGetSilenceValue − get a silence value

SYNOPSIS

#include <audio/Alib.h> long
AGetSilenceValue (

Audio * audio,

ADataFormat data_format,

long * significant_bytes_return,

long * status_return);

DESCRIPTION

AGetSilenceValue() returns the appropriate "silence" value for the given data format. (Some data formats do not use zero to correspond to silence.)  The silence value can be used for clearing or padding an audio file or buffer. 

audio specifies the Audio structure associated with this connection. 

data_format the data format for which a silence value will be returned. 

significant_bytes_return
indicates the number of bytes of the returned long that constitute the actual silence value. Currently, all silence values are one byte in length. The application will thus need to cast the silence value to an unsigned char before using it.

status_return receives the returned status of the operation, unless it is set to NULL. 

RETURN VALUE

Upon successful completion, AGetSilenceValue() returns a long integer containing the silence value in the least significant bytes. 

ERRORS

If status_return is not set to NULL, the following is returned in status_return:

0 AENoError

EXAMPLE

The following example gets the silence value for MuLaw data. 

Audio * audio;  /∗ audio connection ∗/

ADataFormat data_format;  /* data format of interest ∗/

long significant_bytes;  /* number valid bytes in returned long ∗/

unsigned char silence_value;  /* pads audio file or buffer with silence ∗/

long status;  /* status ∗/
.
.
.

/* get silence value for MuLaw data ∗/

data_format = ADFMulaw;

silence_value = (unsigned char)AGetSilenceValue(audio, data_format,

    &significant_bytes, &status);

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 the hardware manual that accompanies your system. 

AUTHOR

AGetSilenceValue() was developed by HP. 

SEE ALSO

Using the Audio Application Program Interface.

Hewlett-Packard Company  —  HP-UX Release 9.03: April 1994

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