au.h revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2004 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _AUDIO_AU_H
#define _AUDIO_AU_H
#pragma ident "%Z%%M% %I% %E% SMI"
#include <sys/isa_defs.h>
#ifdef __cplusplus
extern "C" {
#endif
/*
* Define an on-disk audio file header for the AU file format.
*
* Note that there is an optional 'info' field that immediately follows this
* structure in the file. It is an optional length field that is sometimes
* used to store additional information. At the minimum, it is at
* least 4 bytes.
*
* The offset field is problematic in the general case because the
* field is really "data location", which does not ensure that all
* the bytes between the header and the data are really 'info'.
* Further, there are no absolute guarantees that the info is ASCII text.
*
* When audio files are passed through pipes, the au_data_size field may
* not be known in advance. In such cases, au_data_size should be
* set to AUDIO_AU_UNKNOWN_SIZE.
*/
struct au_filehdr {
};
typedef struct au_filehdr au_filehdr_t;
/*
* This is the appearance of a typical AU audio file as described
* by this structure.
*
* ------------------------------------------------------------
* | | | |
* | AU Audio Header | Info | Audio Data |
* | | (optional) | |
* | | | |
* | 24 bytes | 4 bytes (min) | n bytes |
* | | | |
* ------------------------------------------------------------
*/
/* Define the magic number */
/* Unknown header size */
#define AUDIO_AU_UNKNOWN_SIZE ((unsigned)(~0)) /* (unsigned) -1 */
/* Define the AU encoding fields */
/* precision float */
/* emphasis */
/* emphasis and compression */
/* Byte swapping routines */
#if defined(_BIG_ENDIAN)
#else
#endif /* byte swapping */
#else
#endif /* encode */
#ifdef __cplusplus
}
#endif
#endif /* _AUDIO_AU_H */