1 /*---------------------------------------------------------------------------* 2 Project: Revolution SOUNDFILE dynamic link library 3 File: soundfile.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: soundfile.h,v $ 14 Revision 1.2 02/09/2006 06:51:39 aka 15 Changed copyright. 16 17 18 *---------------------------------------------------------------------------*/ 19 20 #ifndef __SOUNDFILE_H__ 21 #define __SOUNDFILE_H__ 22 23 #define MAKE_A_DLL 24 25 #ifdef MAKE_A_DLL 26 #define LINKDLL __declspec(dllexport) 27 #else 28 #define LINKDLL __declspec(dllimport) 29 #endif 30 31 /*--------------------------------------------------------------------------* 32 Status 33 *--------------------------------------------------------------------------*/ 34 #define SOUND_FILE_SUCCESS 0 35 #define SOUND_FILE_FORMAT_ERROR 1 36 #define SOUND_FILE_FOPEN_ERROR 2 37 38 39 /*--------------------------------------------------------------------------* 40 SOUNDINFO struct 41 *--------------------------------------------------------------------------*/ 42 typedef struct 43 { 44 45 int channels; // Number of channels 46 int bitsPerSample; // Number of bits per sample 47 int sampleRate; // Sample rate in Hz 48 int samples; // Number for samples 49 int loopStart; // 1 based sample index for loop start 50 int loopEnd; // 1 based sample count for loop samples 51 int bufferLength; // buffer length in bytes 52 53 } SOUNDINFO; 54 55 56 /*--------------------------------------------------------------------------* 57 Function prototypes 58 *--------------------------------------------------------------------------*/ 59 LINKDLL int getSoundInfo (char *path, SOUNDINFO *info); 60 LINKDLL int getSoundSamples (char *path, SOUNDINFO *info, void *dest); 61 62 LINKDLL int writeWaveFile (char *path, SOUNDINFO *info, void *samples); 63 LINKDLL int writeAiffFile (char *path, SOUNDINFO *info, void *samples); 64 65 #endif // __SOUNDFILE_H__ 66