spAudio
読み取り中…
検索中…
一致する文字列を見つけられません
spChunk.h
1/*
2 * spChunk.h
3 *
4 * **** UNOFFICIAL VERSION, DON'T USE THIS API ****
5 */
6
7#ifndef __SPCHUNK_H
8#define __SPCHUNK_H
9
10#include <stdio.h>
11#include <sp/spWave.h>
12
13#ifdef __cplusplus
14extern "C" {
15#endif
16
17#ifdef SP_SUPPORT_64BIT_INT
18#define spChunkSize spLong64
19#else
20#define spChunkSize spFileOffset
21#endif
22
23#define SP_CHUNK_INFO_OPTION_FULLBOX_MASK (1)
24#define SP_CHUNK_INFO_OPTION_REWRITE_MASK (1<<1)
25#define SP_CHUNK_INFO_OPTION_PAUSE_BEFORE_WRITE_MASK (1<<2)
26#define SP_CHUNK_INFO_OPTION_PAUSE_AFTER_WRITE_MASK (1<<3)
27#define SP_CHUNK_INFO_OPTION_WRITE_ZEROS_MASK (1<<4)
28#define SP_CHUNK_INFO_OPTION_PAUSE_BEFORE_READ_MASK (1<<5)
29#define SP_CHUNK_INFO_OPTION_PAUSE_AFTER_READ_MASK (1<<6)
30#define SP_CHUNK_INFO_OPTION_MARGIN_CHUNK_MASK (1<<7)
31#define SP_CHUNK_INFO_OPTION_ACCEPT_ZERO_TYPE_MASK (1<<8)
32
33#define SP_CHUNK_INFO_OPTION_USER_MASK_OFFSET 16
34
35typedef struct _spChunk spChunk;
36
37typedef spChunkSize (*spChunkUpdateFunc)(spChunk *chunk, void *data);
38
39typedef struct _spChunkHeader {
40 char type[4];
41
42 char dummy[44];
43} spChunkHeader;
44
45struct _spChunk {
46 struct _spChunk *parent;
47 struct _spChunk *child;
48
49 struct _spChunk *prev;
50 struct _spChunk *next;
51
52 spFileOffset offset;
53
54 spChunkHeader header;
55};
56
57extern spChunk *spFindChunk(spChunk *chunk, const char *type, const char *parent_type);
58extern spChunk *spFindChildChunk(spChunk *top, const char *type, const char *parent_type);
59
60#ifdef __cplusplus
61} /* Close scope of 'extern "C"' declaration */
62#endif
63
64#endif /* __SPCHUNK_H */