00001 /* 00002 $Id: SndStruct.h 3288 2005-05-30 03:06:56Z leighsmith $ 00003 Description: 00004 Defines the NeXT/Sun audio header structure that will be represented in memory and on disk. 00005 00006 Original Author: Stephen Brandon 00007 00008 Copyright (C) 1999 This framework and all source code supplied with it, except where specified, 00009 are Copyright Stephen Brandon and the University of Glasgow, 1999. 00010 You are free to use the source code for any purpose, including commercial applications, as long 00011 as you reproduce this notice on all such software. 00012 00013 Software production is complex and we cannot warrant that the Software will be error free. 00014 Further, we will not be liable to you if the Software is not fit for the purpose for which you 00015 acquired it, or of satisfactory quality. 00016 00017 WE SPECIFICALLY EXCLUDE TO THE FULLEST EXTENT PERMITTED BY THE COURTS ALL WARRANTIES IMPLIED BY LAW 00018 INCLUDING (BUT NOT LIMITED TO) IMPLIED WARRANTIES OF QUALITY, FITNESS FOR A PARTICULAR PURPOSE, AND 00019 NON-INFRINGEMENT OF THIRD PARTIES RIGHTS. 00020 00021 If a court finds that we are liable for death or personal injury caused by our negligence our liability 00022 shall be unlimited. 00023 00024 WE SHALL HAVE NO LIABILITY TO YOU FOR LOSS OF PROFITS, LOSS OF CONTRACTS, LOSS OF DATA, LOSS OF GOODWILL, 00025 OR WORK STOPPAGE, WHICH MAY ARISE FROM YOUR POSSESSION OR USE OF THE SOFTWARE OR ASSOCIATED DOCUMENTATION. 00026 WE SHALL HAVE NO LIABILITY IN RESPECT OF ANY USE OF THE SOFTWARE OR THE ASSOCIATED DOCUMENTATION WHERE SUCH 00027 USE IS NOT IN COMPLIANCE WITH THE TERMS AND CONDITIONS OF THIS AGREEMENT. 00028 */ 00034 #ifndef __SNDSTRUCT__ 00035 #define __SNDSTRUCT__ 00036 00041 #define SND_MAGIC ((int)0x2e736e64) 00042 00046 typedef struct { 00048 int magic; 00050 int dataLocation; 00052 int dataSize; 00054 int dataFormat; 00056 int samplingRate; 00058 int channelCount; 00060 char info[4]; 00061 } SndSoundStruct; 00062 00063 /* ensure we don't conflict with SoundKit defs */ 00064 #ifndef SND_CFORMAT_BITS_DROPPED 00065 00070 #define SND_CFORMAT_BITS_DROPPED (0) 00071 00076 #define SND_CFORMAT_BIT_FAITHFUL (1) 00077 00082 #define SND_CFORMAT_ATC (2) 00083 00088 #define ATC_FRAME_SIZE (256) 00089 00090 /* 00091 * Sampling rates directly supported in hardware. 00092 */ 00097 #define SND_RATE_CODEC (8012.8210513) 00098 00103 #define SND_RATE_LOW (22050.0) 00104 00109 #define SND_RATE_HIGH (44100.0) 00110 00115 #define SND_RATE_LOW_PC (11025.0) 00116 00117 #endif 00118 00119 #endif __SNDSTRUCT__