1 /****************************************************************************
3 * ____ ___ ____ __ ______ ___ ____ ____/ / *
4 * / __ `__ \/ __ `/ |/ / __ `__ \/ __ \/ __ / *
5 * / / / / / / /_/ /> </ / / / / / /_/ / /_/ / *
6 * /_/ /_/ /_/\__,_/_/|_/_/ /_/ /_/\____/\__,_/ *
8 * Copyright (c) 2008, Mukunda Johnson (mukunda@maxmod.org) *
10 * Permission to use, copy, modify, and/or distribute this software for any *
11 * purpose with or without fee is hereby granted, provided that the above *
12 * copyright notice and this permission notice appear in all copies. *
14 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES *
15 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF *
16 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR *
17 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES *
18 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN *
19 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF *
20 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. *
21 ****************************************************************************/
26 #define INPUT_TYPE_MOD 0
27 #define INPUT_TYPE_S3M 1
28 #define INPUT_TYPE_XM 2
29 #define INPUT_TYPE_IT 3
30 #define INPUT_TYPE_WAV 4
31 #define INPUT_TYPE_TXT 5
32 #define INPUT_TYPE_UNK 6
33 #define INPUT_TYPE_H 7
34 #define INPUT_TYPE_MSL 8
36 int get_ext( char* filename );
37 u32 calc_samplooplen( Sample* s );
38 u32 calc_samplen( Sample* s );
39 u32 calc_samplen_ex2( Sample* s );
40 int clamp_s8( int value );
41 int clamp_u8( int value );
42 u32 readbits(u8* buffer, unsigned int pos, unsigned int size);
44 u8 sample_dsformat( Sample* samp );
45 u8 sample_dsreptype( Sample* samp );