1 /*--------------------------------------------------------------------------* 2 Project: Revolution DSP ADPCM encoder 3 File: dspheader.h 4 5 Copyright (C)2001-2006 Nintendo All Rights Reserved. 6 7 These coded instructions, statements, and computer programs contain 8 proprietary information of Nintendo of America Inc. and/or Nintendo 9 Company Ltd., and are protected by Federal copyright law. They may 10 not be disclosed to third parties or copied or duplicated in any form, 11 in whole or in part, without the prior written consent of Nintendo. 12 in whole or in part, without the prior written consent of Nintendo. 13 14 $Log: dspheader.h,v $ 15 Revision 1.2 02/09/2006 07:07:35 aka 16 Changed copyright. 17 18 19 *--------------------------------------------------------------------------*/ 20 21 #ifndef __DSPHEADER_H__ 22 #define __DSPHEADER_H__ 23 24 #define VOICE_TYPE_NOTLOOPED 0x0000 // sample is not looped 25 #define VOICE_TYPE_LOOPED 0x0001 // sample is indeed looped 26 27 #define DEC_MODE_ADPCM 0x0000 // ADPCM mode 28 #define DEC_MODE_PCM16 0x000A // 16-bit PCM mode 29 #define DEC_MODE_PCM8 0x0009 // 8-bit PCM mode (UNSIGNED) 30 31 32 typedef struct 33 { 34 u32 num_samples; 35 u32 num_adpcm_nibbles; 36 u32 sample_rate; 37 38 u16 loop_flag; 39 u16 format; 40 u32 sa; // loop start address 41 u32 ea; // loop end address 42 u32 ca; // current address 43 44 u16 coef[16]; 45 46 // start context 47 u16 gain; 48 u16 ps; 49 u16 yn1; 50 u16 yn2; 51 52 // loop context 53 u16 lps; 54 u16 lyn1; 55 u16 lyn2; 56 57 u16 pad[11]; 58 59 } DSPADPCMHEADER; 60 61 #endif // __DSPHEADER_H__ 62