1 /*---------------------------------------------------------------------------* 2 Project: Revolution DSP ADPCM encoder 3 File: dspadpcm.h 4 5 Copyright (C)1998-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 13 $Log: dspadpcm.h,v $ 14 Revision 1.2 02/09/2006 07:07:35 aka 15 Changed copyright. 16 17 18 *---------------------------------------------------------------------------*/ 19 20 #ifndef __DSPADPCM_H__ 21 #define __DSPADPCM_H__ 22 23 24 typedef struct 25 { 26 27 u32 channels; 28 u32 bitsPerSample; 29 u32 sampleRate; 30 u32 samples; 31 u32 loopStart; 32 u32 loopEnd; 33 u32 bufferLength; 34 35 } SOUNDINFO; 36 37 #define SOUND_FILE_SUCCESS 0 38 #define SOUND_FILE_FORMAT_ERROR 1 39 #define SOUND_FILE_FOPEN_ERROR 2 40 41 typedef struct 42 { 43 // start context 44 s16 coef[16]; 45 u16 gain; 46 u16 pred_scale; 47 s16 yn1; 48 s16 yn2; 49 50 // loop context 51 u16 loop_pred_scale; 52 s16 loop_yn1; 53 s16 loop_yn2; 54 55 } ADPCMINFO; 56 57 58 #endif // __DSPADPCM_H__ 59