aboutsummaryrefslogtreecommitdiff
path: root/src/parsec/include/snd_api.h
blob: b43d6532e0acc2feab68773149d1a67e9d8b67d8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
/*
 * PARSEC HEADER: snd_api.h
 */

#ifndef _SND_API_H_
#define _SND_API_H_


// recognized sample formats

enum sample_formats {

	SAMPLEFORMAT_INVALID,

	SAMPLEFORMAT_WAV,
	SAMPLEFORMAT_VOC,
	SAMPLEFORMAT_AU,
	SAMPLEFORMAT_SAM
};


// generic sample info

struct sample_s {

	int		format;
	dword	totalfilelength;
	dword	headerlength;
	word	datatype;
	word	numchannels;
	dword	samplerate;
	word	alignment;
	word	samplesize;
	dword	samplebytes;
	byte*	samplebuffer;
};


// external functions

sample_s *	SND_ReadSample( sampleinfo_s *pSampleInfo );
void		SND_FreeSample( sample_s *pSample );
void		SND_ConvertToMono( sample_s *pSample );
void 		SND_ConvertRate( sample_s *pSample, int samplerate );


#endif // _SND_API_H_