aboutsummaryrefslogtreecommitdiff
path: root/wave.h
blob: 37989968556792468391a7754e16d14cfe2920f0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
// wave.h

#ifndef __WAVE_H__
#define __WAVE_H__ 1

typedef struct __wave
{
	int channels;				// audio channels, mono, stereo, etc...
	int samples_per_sec;		// sample output frequency
	int bits_per_sample;		// 8 or 16
	unsigned int frame_size;	// ((bps + 7) / 8) * channels
	unsigned int frame_count;	// wave duration = (1 / frequency) * frame_count
	const void *frame_data;		// pointer to the buffer containing sample frames
}wave_t;

int wave_out(wave_t *wave);

#endif