summaryrefslogtreecommitdiffstats
path: root/parecord/audio_types.h
blob: 6b6fd122ee685699f1b967e799b789f5192b002f (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
#ifndef PAR_AUDIOTYPES_H
#define PAR_AUDIOTYPES_H

#include <stdint.h>
#include <sys/types.h>

#include "wav_header.h"

enum audio_types {
	AUDIO_TYPE_WAVE,
	AUDIO_TYPE_NONE = -1
};

struct audio_types_info {
	const char *name;
	off_t rsv_bytes;
};

struct wav_header *init_wav_header(struct wav_header *header,
	uint32_t size, uint16_t audioFormat, uint16_t numChannels,
	uint32_t sampleRate, uint32_t bitsPerSample);
int checkAudioType(char *source);
off_t getOffset(int format);

#endif /* AT_AUDIOTYPES_H */