Mercurial > hg > sidinfo
annotate sidlib.h @ 266:254828e9213b
Make sidlib_stil_fields[] public.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 06 Jan 2020 00:26:27 +0200 |
parents | 5afa6052f796 |
children | 439d08a11365 |
rev | line source |
---|---|
70
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
1 /* |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
2 * SIDInfoLib - Way too simplistic PSID/RSID file library |
171
d86ade7d0dfd
Change copyright blurbs slightly.
Matti Hamalainen <ccr@tnsp.org>
parents:
169
diff
changeset
|
3 * Programmed and designed by Matti 'ccr' Hämäläinen <ccr@tnsp.org> |
227 | 4 * (C) Copyright 2014-2020 Tecnic Software productions (TNSP) |
70
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
5 */ |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
6 #ifndef SIDLIB_H |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
7 #define SIDLIB_H 1 |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
8 |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
9 #include "th_util.h" |
85
4c0ecb078591
Rename various variables and functions and change relevant places to use the
Matti Hamalainen <ccr@tnsp.org>
parents:
74
diff
changeset
|
10 #include "th_ioctx.h" |
70
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
11 #include "th_crypto.h" |
224
4bec78f45188
Use th_datastruct::th_llist_t instead of yet another linked list
Matti Hamalainen <ccr@tnsp.org>
parents:
223
diff
changeset
|
12 #include "th_datastruct.h" |
70
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
13 |
85
4c0ecb078591
Rename various variables and functions and change relevant places to use the
Matti Hamalainen <ccr@tnsp.org>
parents:
74
diff
changeset
|
14 |
72 | 15 #ifdef __cplusplus |
16 extern "C" { | |
17 #endif | |
18 | |
70
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
19 |
220 | 20 // |
70
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
21 // Some constants |
220 | 22 // |
230 | 23 #define SIDLIB_PSID_MAGIC_LEN (4) |
24 #define SIDLIB_PSID_STR_LEN (32) | |
25 #define SIDLIB_BUFFER_SIZE (1024 * 16) | |
86
e1ff9cd27a84
Initial port of songlength database (SLDB) handling code from XMMS-SID to here.
Matti Hamalainen <ccr@tnsp.org>
parents:
85
diff
changeset
|
26 |
e1ff9cd27a84
Initial port of songlength database (SLDB) handling code from XMMS-SID to here.
Matti Hamalainen <ccr@tnsp.org>
parents:
85
diff
changeset
|
27 |
220 | 28 enum |
29 { | |
30 // Player flags | |
31 PSF_PLAYER_TYPE = 0x01, // 0 = built-in, 1 = Compute! SIDPlayer MUS | |
32 PSF_PLAYSID_TUNE = 0x02, // 0 = Real C64-compatible, 1 = PlaySID specific (v2NG) | |
33 | |
34 // Video standard used (v2NG+) | |
35 PSF_CLOCK_UNKNOWN = 0x00, | |
36 PSF_CLOCK_PAL = 0x01, | |
37 PSF_CLOCK_NTSC = 0x02, | |
38 PSF_CLOCK_ANY = 0x03, | |
39 PSF_CLOCK_MASK = 0x03, | |
40 | |
41 // SID model (v2NG+) | |
42 PSF_MODEL_UNKNOWN = 0x00, | |
43 PSF_MODEL_MOS6581 = 0x01, | |
44 PSF_MODEL_MOS8580 = 0x02, | |
45 PSF_MODEL_ANY = 0x03, | |
46 PSF_MODEL_MASK = 0x03, | |
47 }; | |
48 | |
49 | |
262
ef1d6d16718e
s/SIDLibSTILSubNode/SIDLibSTILSubTune/g
Matti Hamalainen <ccr@tnsp.org>
parents:
260
diff
changeset
|
50 // STIL database subtune fields, see SIDLibSTILSubTune |
241
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
51 enum |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
52 { |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
53 STF_NAME, |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
54 STF_AUTHOR, |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
55 STF_TITLE, |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
56 STF_INFO, |
242 | 57 STF_ARTIST, |
58 STF_COMMENT, | |
241
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
59 |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
60 STF_LAST |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
61 }; |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
62 |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
63 |
220 | 64 // |
65 // Structures | |
66 // | |
224
4bec78f45188
Use th_datastruct::th_llist_t instead of yet another linked list
Matti Hamalainen <ccr@tnsp.org>
parents:
223
diff
changeset
|
67 typedef struct |
86
e1ff9cd27a84
Initial port of songlength database (SLDB) handling code from XMMS-SID to here.
Matti Hamalainen <ccr@tnsp.org>
parents:
85
diff
changeset
|
68 { |
224
4bec78f45188
Use th_datastruct::th_llist_t instead of yet another linked list
Matti Hamalainen <ccr@tnsp.org>
parents:
223
diff
changeset
|
69 th_llist_t node; |
4bec78f45188
Use th_datastruct::th_llist_t instead of yet another linked list
Matti Hamalainen <ccr@tnsp.org>
parents:
223
diff
changeset
|
70 |
86
e1ff9cd27a84
Initial port of songlength database (SLDB) handling code from XMMS-SID to here.
Matti Hamalainen <ccr@tnsp.org>
parents:
85
diff
changeset
|
71 th_md5hash_t hash; // MD5 hash-digest |
e1ff9cd27a84
Initial port of songlength database (SLDB) handling code from XMMS-SID to here.
Matti Hamalainen <ccr@tnsp.org>
parents:
85
diff
changeset
|
72 int nlengths; // Number of lengths |
e1ff9cd27a84
Initial port of songlength database (SLDB) handling code from XMMS-SID to here.
Matti Hamalainen <ccr@tnsp.org>
parents:
85
diff
changeset
|
73 int *lengths; // Lengths in seconds |
e1ff9cd27a84
Initial port of songlength database (SLDB) handling code from XMMS-SID to here.
Matti Hamalainen <ccr@tnsp.org>
parents:
85
diff
changeset
|
74 } SIDLibSLDBNode; |
e1ff9cd27a84
Initial port of songlength database (SLDB) handling code from XMMS-SID to here.
Matti Hamalainen <ccr@tnsp.org>
parents:
85
diff
changeset
|
75 |
e1ff9cd27a84
Initial port of songlength database (SLDB) handling code from XMMS-SID to here.
Matti Hamalainen <ccr@tnsp.org>
parents:
85
diff
changeset
|
76 |
e1ff9cd27a84
Initial port of songlength database (SLDB) handling code from XMMS-SID to here.
Matti Hamalainen <ccr@tnsp.org>
parents:
85
diff
changeset
|
77 typedef struct |
e1ff9cd27a84
Initial port of songlength database (SLDB) handling code from XMMS-SID to here.
Matti Hamalainen <ccr@tnsp.org>
parents:
85
diff
changeset
|
78 { |
224
4bec78f45188
Use th_datastruct::th_llist_t instead of yet another linked list
Matti Hamalainen <ccr@tnsp.org>
parents:
223
diff
changeset
|
79 SIDLibSLDBNode *nodes, **pindex; |
4bec78f45188
Use th_datastruct::th_llist_t instead of yet another linked list
Matti Hamalainen <ccr@tnsp.org>
parents:
223
diff
changeset
|
80 size_t nnodes; |
86
e1ff9cd27a84
Initial port of songlength database (SLDB) handling code from XMMS-SID to here.
Matti Hamalainen <ccr@tnsp.org>
parents:
85
diff
changeset
|
81 } SIDLibSLDB; |
70
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
82 |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
83 |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
84 typedef struct |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
85 { |
264
5afa6052f796
Change SIDLibSTILSubTune::fields to new SIDLibSTILField structure for
Matti Hamalainen <ccr@tnsp.org>
parents:
262
diff
changeset
|
86 int ndata; |
5afa6052f796
Change SIDLibSTILSubTune::fields to new SIDLibSTILField structure for
Matti Hamalainen <ccr@tnsp.org>
parents:
262
diff
changeset
|
87 char **data; |
5afa6052f796
Change SIDLibSTILSubTune::fields to new SIDLibSTILField structure for
Matti Hamalainen <ccr@tnsp.org>
parents:
262
diff
changeset
|
88 } SIDLibSTILField; |
5afa6052f796
Change SIDLibSTILSubTune::fields to new SIDLibSTILField structure for
Matti Hamalainen <ccr@tnsp.org>
parents:
262
diff
changeset
|
89 |
5afa6052f796
Change SIDLibSTILSubTune::fields to new SIDLibSTILField structure for
Matti Hamalainen <ccr@tnsp.org>
parents:
262
diff
changeset
|
90 |
5afa6052f796
Change SIDLibSTILSubTune::fields to new SIDLibSTILField structure for
Matti Hamalainen <ccr@tnsp.org>
parents:
262
diff
changeset
|
91 typedef struct |
5afa6052f796
Change SIDLibSTILSubTune::fields to new SIDLibSTILField structure for
Matti Hamalainen <ccr@tnsp.org>
parents:
262
diff
changeset
|
92 { |
5afa6052f796
Change SIDLibSTILSubTune::fields to new SIDLibSTILField structure for
Matti Hamalainen <ccr@tnsp.org>
parents:
262
diff
changeset
|
93 SIDLibSTILField fields[STF_LAST]; |
262
ef1d6d16718e
s/SIDLibSTILSubNode/SIDLibSTILSubTune/g
Matti Hamalainen <ccr@tnsp.org>
parents:
260
diff
changeset
|
94 } SIDLibSTILSubTune; |
241
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
95 |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
96 |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
97 typedef struct |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
98 { |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
99 th_llist_t node; |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
100 |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
101 char *filename; |
260 | 102 int nsubtunes; |
262
ef1d6d16718e
s/SIDLibSTILSubNode/SIDLibSTILSubTune/g
Matti Hamalainen <ccr@tnsp.org>
parents:
260
diff
changeset
|
103 SIDLibSTILSubTune **subtunes; |
241
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
104 } SIDLibSTILNode; |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
105 |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
106 |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
107 typedef struct |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
108 { |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
109 SIDLibSTILNode *nodes, **pindex; |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
110 size_t nnodes; |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
111 } SIDLibSTILDB; |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
112 |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
113 |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
114 typedef struct |
c9b57c8fd058
Begin work on STIL database parsing and handling.
Matti Hamalainen <ccr@tnsp.org>
parents:
236
diff
changeset
|
115 { |
223
a76276ff7ba8
Rename PSID_* constant defines to SIDLIB_PSID_*.
Matti Hamalainen <ccr@tnsp.org>
parents:
222
diff
changeset
|
116 char magic[SIDLIB_PSID_MAGIC_LEN + 1]; // "PSID" / "RSID" magic identifier |
70
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
117 uint16_t |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
118 version, // Version number |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
119 dataOffset, // Start of actual c64 data in file |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
120 loadAddress, // Loading address |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
121 initAddress, // Initialization address |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
122 playAddress, // Play one frame |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
123 nSongs, // Number of subsongs |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
124 startSong; // Default starting song |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
125 uint32_t speed; // Speed |
128
2636185649c6
Add si_fread_str() helper function.
Matti Hamalainen <ccr@tnsp.org>
parents:
126
diff
changeset
|
126 char *sidName; // Descriptive text-fields, ASCIIZ |
2636185649c6
Add si_fread_str() helper function.
Matti Hamalainen <ccr@tnsp.org>
parents:
126
diff
changeset
|
127 char *sidAuthor; |
2636185649c6
Add si_fread_str() helper function.
Matti Hamalainen <ccr@tnsp.org>
parents:
126
diff
changeset
|
128 char *sidCopyright; |
70
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
129 |
144 | 130 // PSIDv2+ data |
70
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
131 uint16_t flags; // Flags |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
132 uint8_t startPage, pageLength; |
133
9cfa0553e7f9
Add support for reading PSID/RSID v4 in sidlib.
Matti Hamalainen <ccr@tnsp.org>
parents:
132
diff
changeset
|
133 uint8_t sid2Addr, sid3Addr; |
70
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
134 |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
135 // Extra data |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
136 BOOL isRSID; |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
137 size_t dataSize; // Total size of data - header |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
138 th_md5hash_t hash; // Songlength database hash |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
139 |
88
c5ff71d64e53
More work on sidlib SLDB code.
Matti Hamalainen <ccr@tnsp.org>
parents:
86
diff
changeset
|
140 SIDLibSLDBNode *lengths; // Songlength information node pointer |
226
c32015f4969e
Rename PSIDHeader struct to SIDLibPSIDHeader to conform with the SIDLib
Matti Hamalainen <ccr@tnsp.org>
parents:
224
diff
changeset
|
141 BOOL allocated; // TRUE if structure has been allocated |
88
c5ff71d64e53
More work on sidlib SLDB code.
Matti Hamalainen <ccr@tnsp.org>
parents:
86
diff
changeset
|
142 |
226
c32015f4969e
Rename PSIDHeader struct to SIDLibPSIDHeader to conform with the SIDLib
Matti Hamalainen <ccr@tnsp.org>
parents:
224
diff
changeset
|
143 } SIDLibPSIDHeader; |
70
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
144 |
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
145 |
74 | 146 // |
266
254828e9213b
Make sidlib_stil_fields[] public.
Matti Hamalainen <ccr@tnsp.org>
parents:
264
diff
changeset
|
147 // Globals |
254828e9213b
Make sidlib_stil_fields[] public.
Matti Hamalainen <ccr@tnsp.org>
parents:
264
diff
changeset
|
148 // |
254828e9213b
Make sidlib_stil_fields[] public.
Matti Hamalainen <ccr@tnsp.org>
parents:
264
diff
changeset
|
149 const char *sidlib_stil_fields[STF_LAST]; |
254828e9213b
Make sidlib_stil_fields[] public.
Matti Hamalainen <ccr@tnsp.org>
parents:
264
diff
changeset
|
150 |
254828e9213b
Make sidlib_stil_fields[] public.
Matti Hamalainen <ccr@tnsp.org>
parents:
264
diff
changeset
|
151 // |
74 | 152 // Functions |
153 // | |
226
c32015f4969e
Rename PSIDHeader struct to SIDLibPSIDHeader to conform with the SIDLib
Matti Hamalainen <ccr@tnsp.org>
parents:
224
diff
changeset
|
154 int sidlib_read_sid_file(th_ioctx *ctx, SIDLibPSIDHeader *psid, const BOOL newSLDB); |
c32015f4969e
Rename PSIDHeader struct to SIDLibPSIDHeader to conform with the SIDLib
Matti Hamalainen <ccr@tnsp.org>
parents:
224
diff
changeset
|
155 int sidlib_read_sid_file_alloc(th_ioctx *ctx, SIDLibPSIDHeader **ppsid, const BOOL newSLDB); |
c32015f4969e
Rename PSIDHeader struct to SIDLibPSIDHeader to conform with the SIDLib
Matti Hamalainen <ccr@tnsp.org>
parents:
224
diff
changeset
|
156 void sidlib_free_sid_file(SIDLibPSIDHeader *psid); |
74 | 157 |
222
3a01518fffe0
Rename sidlib functions from si_* prefix to sidlib_*.
Matti Hamalainen <ccr@tnsp.org>
parents:
221
diff
changeset
|
158 const char * sidlib_get_sid_clock_str(const int flags); |
3a01518fffe0
Rename sidlib functions from si_* prefix to sidlib_*.
Matti Hamalainen <ccr@tnsp.org>
parents:
221
diff
changeset
|
159 const char * sidlib_get_sid_model_str(const int flags); |
70
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
160 |
236
609bfc1bd628
Change sidlib_sldb_new() API to int sidlib_sldb_new(SIDLibSLDB **pdbh).
Matti Hamalainen <ccr@tnsp.org>
parents:
231
diff
changeset
|
161 int sidlib_sldb_new(SIDLibSLDB **pdbh); |
222
3a01518fffe0
Rename sidlib functions from si_* prefix to sidlib_*.
Matti Hamalainen <ccr@tnsp.org>
parents:
221
diff
changeset
|
162 int sidlib_sldb_read(th_ioctx *ctx, SIDLibSLDB *dbh); |
3a01518fffe0
Rename sidlib functions from si_* prefix to sidlib_*.
Matti Hamalainen <ccr@tnsp.org>
parents:
221
diff
changeset
|
163 int sidlib_sldb_build_index(SIDLibSLDB *dbh); |
3a01518fffe0
Rename sidlib functions from si_* prefix to sidlib_*.
Matti Hamalainen <ccr@tnsp.org>
parents:
221
diff
changeset
|
164 void sidlib_sldb_free(SIDLibSLDB *dbh); |
3a01518fffe0
Rename sidlib functions from si_* prefix to sidlib_*.
Matti Hamalainen <ccr@tnsp.org>
parents:
221
diff
changeset
|
165 SIDLibSLDBNode * sidlib_sldb_get_by_hash(SIDLibSLDB *dbh, th_md5hash_t hash); |
86
e1ff9cd27a84
Initial port of songlength database (SLDB) handling code from XMMS-SID to here.
Matti Hamalainen <ccr@tnsp.org>
parents:
85
diff
changeset
|
166 |
245
6cb01bf6c8c8
Make the STILdb functions public.
Matti Hamalainen <ccr@tnsp.org>
parents:
242
diff
changeset
|
167 int sidlib_stildb_new(SIDLibSTILDB **pdbh); |
6cb01bf6c8c8
Make the STILdb functions public.
Matti Hamalainen <ccr@tnsp.org>
parents:
242
diff
changeset
|
168 int sidlib_stildb_read(th_ioctx *ctx, SIDLibSTILDB *dbh); |
6cb01bf6c8c8
Make the STILdb functions public.
Matti Hamalainen <ccr@tnsp.org>
parents:
242
diff
changeset
|
169 int sidlib_stildb_build_index(SIDLibSTILDB *dbh); |
6cb01bf6c8c8
Make the STILdb functions public.
Matti Hamalainen <ccr@tnsp.org>
parents:
242
diff
changeset
|
170 void sidlib_stildb_free(SIDLibSTILDB *dbh); |
6cb01bf6c8c8
Make the STILdb functions public.
Matti Hamalainen <ccr@tnsp.org>
parents:
242
diff
changeset
|
171 SIDLibSTILNode * sidlib_stildb_get_node(SIDLibSTILDB *dbh, const char *filename); |
101
9d4d1783800b
Add si_sldb_{read,write}_bin() functions to write and read a binary format
Matti Hamalainen <ccr@tnsp.org>
parents:
100
diff
changeset
|
172 |
70
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
173 |
72 | 174 #ifdef __cplusplus |
175 } | |
176 #endif | |
70
4779bbec2f28
Split some functionality into sidlib.[ch].
Matti Hamalainen <ccr@tnsp.org>
parents:
diff
changeset
|
177 #endif // SIDLIB_H |