-
Notifications
You must be signed in to change notification settings - Fork 12
/
fileops.h
68 lines (52 loc) · 1.23 KB
/
fileops.h
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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
/*
* Komposter
*
* Copyright (c) 2010 Noora Halme et al. (see AUTHORS)
*
* This code is licensed under the GNU General Public
* License version 2. See LICENSE for full text.
*
* File operations for IFF formats
*
*/
#ifndef __FILEOPS_H__
#define __FILEOPS_H__
// error codes from chunk loaders
#define FILE_ERROR_FWRITE 1
#define FILE_ERROR_FREAD 2
#define FILE_ERROR_CHUNKTYPE 3
#define FILE_ERROR_FOPEN 4
#define FILE_ERROR_CORRUPT 5
//
// file load and save functions
//
int load_ksong(char *filename);
int save_ksong(char *filename);
//
// chunk load functions
//
int load_chunk_ksyn(int syn, FILE *f);
int load_chunk_kbnk(int syn, FILE *f);
int load_chunk_kpat(int patt, FILE *f);
int load_chunk_kseq(FILE *f);
//
// chunk save functions
//
int save_chunk_ksyn(int syn, FILE *f);
int save_chunk_kbnk(int syn, FILE *f);
int save_chunk_kpat(int patt, FILE *f);
int save_chunk_kseq(FILE *f);
//
// utility functions
//
void* load_chunk(FILE *f, char *chunktype);
long probe_chunk(FILE *f, char *chunktype);
//
// signal path following functions
//
void synth_stackify(int syn);
int synth_trace(int syn, int pm, int top);
void synth_colorize(int syn);
int synth_find_color(int syn, int pm);
void synth_update_bpm(int newbpm);
#endif