summaryrefslogtreecommitdiff
path: root/plugins/alac/stream.h
blob: 2e32e4a7d99cce41cf0f0dcdb2ade1d0f47b1c01 (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
#ifndef STREAM_H
#define STREAM_H

/* stream.h */

#ifdef _WIN32
	#include "stdint_win.h"
#else
	#include <stdint.h>
#endif

#include "../../deadbeef.h"

typedef struct stream_tTAG stream_t;

void stream_read(stream_t *stream, size_t len, void *buf);

int32_t stream_read_int32(stream_t *stream);
uint32_t stream_read_uint32(stream_t *stream);

int16_t stream_read_int16(stream_t *stream);
uint16_t stream_read_uint16(stream_t *stream);

int8_t stream_read_int8(stream_t *stream);
uint8_t stream_read_uint8(stream_t *stream);

void stream_skip(stream_t *stream, int64_t skip);

int stream_eof(stream_t *stream);

int64_t stream_tell(stream_t *stream);
int64_t stream_setpos(stream_t *stream, int64_t pos);

stream_t *stream_create_file(DB_FILE *file,
                             int bigendian, int64_t junk_offset);
void stream_destroy(stream_t *stream);

#endif /* STREAM_H */