/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (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 2009 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
/*
* This header file defines the .wav audio file format.
*/
#ifndef _WAV_H
#define _WAV_H
#ifdef __cplusplus
extern "C" {
#endif
/*
* Define the on-disk audio file header for the .wav file format.
* By definition .wav files are little endian. Macros are provided
* to make the conversion easier.
*
* The .wav format is one of the variations of the RIFF format. To
* that end it contains a RIFF header chunk, a type chunk, a format
* chunk, and then one or more data chunks. The following illustrates
* the format:
*
* RIFF <Length of data> RIFF header chunk
* WAVE type chunk
* fmt<sp> format chunk
* DATA <Length of data> <data> data chunk (one or more)
*
* Since the RIFF headers never change for a .wav file there's no real reason
* to separate the header into the different chunks. Thus a single header
* structure is defined for the header.
*
* When building a .wav header the size of the data isn't always known.
* The following define is used for that situation.
*/
#define AUDIO_WAV_UNKNOWN_SIZE (~0)
struct wav_filehdr {
};
/* define for wav_filehdr.wav_riff_ID */
/* define for wav_filehdr.wav_wave_ID */
/* define for wav_filehdr.wav_fmt_ID */
/* define for wav_filehdr.wav_fmt_size */
/* defines for wav_filehdr.wav_fmt_encoding */
/* defines for wav_filehdr.wav_fmt_channels */
#define AUDIO_WAV_FMT_CHANNELS_MONO 0
/* defines for wav_filehdr.wav_fmt_bytes_per_sample */
/* defines for wav_filehdr.wav_fmt_bits_per_sample */
/* defines for wav_filehdr.wav_data_ID */
/* byte swapping macros */
#if defined(__sparc) /* big endian */
#else
#endif /* byte swapping */
#ifdef __cplusplus
}
#endif
#endif /* _WAV_H */