annotate minijss/jssmod.h @ 2279:fc58f62f100c

Bump copyright years.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 18 Jun 2019 12:12:58 +0300
parents 40ccc09f09be
children dcf1016f3d27
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
1 /*
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
2 * miniJSS - Module structure and handling routines
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
3 * Programmed and designed by Matti 'ccr' Hamalainen
2279
fc58f62f100c Bump copyright years.
Matti Hamalainen <ccr@tnsp.org>
parents: 2278
diff changeset
4 * (C) Copyright 2006-2019 Tecnic Software productions (TNSP)
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
5 */
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
6 #ifndef JSSMOD_H
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
7 #define JSSMOD_H
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
8
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
9 #include "jss.h"
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
10 #include "dmres.h"
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
11
358
3bdc776a4b33 Add C++ guards.
Matti Hamalainen <ccr@tnsp.org>
parents: 56
diff changeset
12 #ifdef __cplusplus
3bdc776a4b33 Add C++ guards.
Matti Hamalainen <ccr@tnsp.org>
parents: 56
diff changeset
13 extern "C" {
3bdc776a4b33 Add C++ guards.
Matti Hamalainen <ccr@tnsp.org>
parents: 56
diff changeset
14 #endif
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
15
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
16 // Max data size definitions
1220
fc2ab4dcd046 Bump up some JSS limits.
Matti Hamalainen <ccr@tnsp.org>
parents: 1216
diff changeset
17 #define jsetMaxChannels (128)
fc2ab4dcd046 Bump up some JSS limits.
Matti Hamalainen <ccr@tnsp.org>
parents: 1216
diff changeset
18 #define jsetMaxRows (16*1024) // Number of rows checked against
1248
d8324718d4b9 Add define for default number of rows in pattern.
Matti Hamalainen <ccr@tnsp.org>
parents: 1246
diff changeset
19 #define jsetDefaultRows (64) // Default number of rows in pattern
1220
fc2ab4dcd046 Bump up some JSS limits.
Matti Hamalainen <ccr@tnsp.org>
parents: 1216
diff changeset
20 #define jsetMaxPatterns (1024) // Max patterns
1215
66c79bae8704 Bump up some maximum values for JSS module data.
Matti Hamalainen <ccr@tnsp.org>
parents: 1210
diff changeset
21 #define jsetMaxInstruments (1024)
66c79bae8704 Bump up some maximum values for JSS module data.
Matti Hamalainen <ccr@tnsp.org>
parents: 1210
diff changeset
22 #define jsetMaxOrders (512)
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
23 #define jsetNNotes (11 * 12)
1220
fc2ab4dcd046 Bump up some JSS limits.
Matti Hamalainen <ccr@tnsp.org>
parents: 1216
diff changeset
24 #define jsetMinNote (0) // Smallest note number
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
25 #define jsetMaxNote (jsetNNotes - 1)
1220
fc2ab4dcd046 Bump up some JSS limits.
Matti Hamalainen <ccr@tnsp.org>
parents: 1216
diff changeset
26 #define jsetMaxEnvPoints (64) // Max number of envelope points
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
27
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
28 // Instrument envelope flags
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
29 #define jenvfUsed (0x01) // Envelope is used
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
30 #define jenvfSustain (0x02) // Envelope has a sustain point (XM) or has sustain loop (IT)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
31 #define jenvfLooped (0x04) // Envelope is looped
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
32
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
33 // Instrument vibrato waveform types
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
34 #define jvibSine (0)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
35 #define jvibRamp (1)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
36 #define jvibSquare (2)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
37 #define jvibRandom (3)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
38
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
39 // General stuff
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
40 #define jsetNoteOff (-2)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
41 #define jsetOrderEnd (-1)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
42 #define jsetOrderSkip (-2)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
43
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
44
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
45 // General module flags
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
46 #define jmdfAmigaPeriods (0x0001) // Use non-linear periods (Amiga)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
47 #define jmdfAmigaLimits (0x0002) // Use Amiga-styled valuelimits
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
48 #define jmdfStereo (0x0008) // Use stereo output, if possible
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
49
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
50 #define jmdfFT2Replay (0x0010) // Use FT2 replaying bugs/features
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
51 #define jmdfST300Slides (0x0020) // Use Scream Tracker 3.00 slides
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
52 #define jmdfByteLStart (0x0040) // LStart is in BYTES instead of WORDS (MOD only)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
53
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
54
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
55 // Module format types
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
56 enum JMDT
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
57 {
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
58 jmdtMOD = 1,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
59 jmdtS3M,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
60 jmdtXM,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
61 jmdtIT
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
62 };
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
63
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
64
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
65 // Bits for sample conversion routines
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
66 #define jsampDelta (0x01)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
67 #define jsampFlipSign (0x02)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
68 #define jsampSwapEndianess (0x04)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
69 #define jsampSplit (0x08)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
70
1236
b8c9af10b7fd Work on JSSMOD format.
Matti Hamalainen <ccr@tnsp.org>
parents: 1231
diff changeset
71 #define jsampHasData (0x80) // Special flag
b8c9af10b7fd Work on JSSMOD format.
Matti Hamalainen <ccr@tnsp.org>
parents: 1231
diff changeset
72
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
73
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
74 // Internal instrument structure
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
75 typedef struct
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
76 {
49
033c660c25f5 Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
77 int size, // Length in units
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
78 loopS, // Loop start position in units
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
79 loopE; // Loop end position in units
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
80 int volume, // Volume [jsetMinVol...jsetMaxVol]
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
81 flags, // Flags - see jss.h jsfXXXX
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
82 C4BaseSpeed, // C4BaseSpeed
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
83 ERelNote, // Extended: Relative note value
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
84 EFineTune, // Extended: Fine-tune value
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
85 EPanning; // Extended: Panning
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
86 #ifndef JSS_LIGHT
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
87 char *desc;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
88 #endif
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
89 void *data; // Sample data
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
90
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
91 int convFlags;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
92 } JSSInstrument;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
93
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
94
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
95 // Envelope point structure
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
96 typedef struct
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
97 {
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
98 int frame, value;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
99 } JSSEnvelopePoint;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
100
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
101
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
102 // Envelope structure
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
103 typedef struct
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
104 {
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
105 int flags,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
106 npoints,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
107 sustain,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
108 loopS,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
109 loopE;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
110 JSSEnvelopePoint points[jsetMaxEnvPoints];
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
111 } JSSEnvelope;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
112
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
113
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
114 // Extended instrument
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
115 typedef struct
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
116 {
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
117 #ifndef JSS_LIGHT
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
118 char *desc;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
119 #endif
1178
f1bbac567942 Oops, forgot to commit this change to add the conversion table to
Matti Hamalainen <ccr@tnsp.org>
parents: 1163
diff changeset
120 int nsamples,
f1bbac567942 Oops, forgot to commit this change to add the conversion table to
Matti Hamalainen <ccr@tnsp.org>
parents: 1163
diff changeset
121 sNumForNotes[jsetNNotes],
1402
b47109fce375 Make JSSExtInstrument.instConvSamples dynamically allocated and add check
Matti Hamalainen <ccr@tnsp.org>
parents: 1349
diff changeset
122 *instConvTable;
b47109fce375 Make JSSExtInstrument.instConvSamples dynamically allocated and add check
Matti Hamalainen <ccr@tnsp.org>
parents: 1349
diff changeset
123
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
124 JSSEnvelope volumeEnv, panningEnv;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
125 int vibratoType,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
126 vibratoSweep,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
127 vibratoDepth,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
128 vibratoRate,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
129 fadeOut;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
130 } JSSExtInstrument;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
131
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
132
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
133 // Internal pattern structures
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
134 typedef struct
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
135 {
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
136 int note,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
137 instrument,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
138 volume,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
139 effect,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
140 param;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
141 } JSSNote;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
142
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
143
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
144 typedef struct
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
145 {
2278
40ccc09f09be Implement empty channel removal in xm2jss and make JSSMOD format support
Matti Hamalainen <ccr@tnsp.org>
parents: 2002
diff changeset
146 int nrows, nchannels, nmap;
40ccc09f09be Implement empty channel removal in xm2jss and make JSSMOD format support
Matti Hamalainen <ccr@tnsp.org>
parents: 2002
diff changeset
147 BOOL *used;
40ccc09f09be Implement empty channel removal in xm2jss and make JSSMOD format support
Matti Hamalainen <ccr@tnsp.org>
parents: 2002
diff changeset
148 Uint8 *map;
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
149 JSSNote *data;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
150 } JSSPattern;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
151
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
152
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
153 // Module structure
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
154 typedef struct
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
155 {
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
156 int moduleType; // Type of the module
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
157 char *moduleName; // Title/name
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
158 char *trackerName; // Tracker software name
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
159 int defSpeed, // Initial values
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
160 defTempo,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
161 defFlags,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
162 defRestartPos,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
163 intVersion, // Format's internal version
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
164 nchannels,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
165 ninstruments,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
166 nextInstruments,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
167 npatterns,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
168 norders;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
169
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
170 int defPanning[jsetNChannels];
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
171 int orderList[jsetMaxOrders];
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
172 JSSPattern *patterns[jsetMaxPatterns + 1];
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
173 JSSInstrument *instruments[jsetMaxInstruments];
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
174 JSSExtInstrument *extInstruments[jsetMaxInstruments];
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
175
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
176 #ifdef JSS_SUP_THREADS
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
177 DMMutex *mutex;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
178 #endif
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
179
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
180 } JSSModule;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
181
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
182
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
183 #ifdef JSS_SUP_JSSMOD
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
184
2278
40ccc09f09be Implement empty channel removal in xm2jss and make JSSMOD format support
Matti Hamalainen <ccr@tnsp.org>
parents: 2002
diff changeset
185 #define JSSMOD_VERSION (0x30)
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
186
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
187 enum
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
188 {
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
189 PATMODE_RAW_HORIZ = 1,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
190 PATMODE_COMP_HORIZ,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
191 PATMODE_RAW_VERT,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
192 PATMODE_COMP_VERT,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
193 PATMODE_RAW_ELEM,
1127
e22d4ceb6414 Cosmetics pass, remove excess and trailing whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents: 948
diff changeset
194 PATMODE_LAST
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
195 };
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
196
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
197 /* JSSMOD typedefs
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
198 */
2002
5cec199f49f8 Remove useless __packed__ attributes.
Matti Hamalainen <ccr@tnsp.org>
parents: 1972
diff changeset
199 typedef struct
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
200 {
1221
e0aa979e7188 Change sizes of some JSSMOD structure members.
Matti Hamalainen <ccr@tnsp.org>
parents: 1220
diff changeset
201 char idMagic[2]; // "JM"
e0aa979e7188 Change sizes of some JSSMOD structure members.
Matti Hamalainen <ccr@tnsp.org>
parents: 1220
diff changeset
202 Uint8 idVersion; // 0x10 for 1.0, etc.
e0aa979e7188 Change sizes of some JSSMOD structure members.
Matti Hamalainen <ccr@tnsp.org>
parents: 1220
diff changeset
203 Uint16
e0aa979e7188 Change sizes of some JSSMOD structure members.
Matti Hamalainen <ccr@tnsp.org>
parents: 1220
diff changeset
204 defFlags, // Flags field: see jmdf* flags
e0aa979e7188 Change sizes of some JSSMOD structure members.
Matti Hamalainen <ccr@tnsp.org>
parents: 1220
diff changeset
205 intVersion, // Internal version, format dependant
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
206 norders, // Number of orders in orderlist
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
207 npatterns, // Number of patterns
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
208 nextInstruments, // Number of extended instruments
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
209 ninstruments, // Number of sample-instruments
1221
e0aa979e7188 Change sizes of some JSSMOD structure members.
Matti Hamalainen <ccr@tnsp.org>
parents: 1220
diff changeset
210 defRestartPos; // Default restart position in orderlist
e0aa979e7188 Change sizes of some JSSMOD structure members.
Matti Hamalainen <ccr@tnsp.org>
parents: 1220
diff changeset
211
e0aa979e7188 Change sizes of some JSSMOD structure members.
Matti Hamalainen <ccr@tnsp.org>
parents: 1220
diff changeset
212 Uint8
e0aa979e7188 Change sizes of some JSSMOD structure members.
Matti Hamalainen <ccr@tnsp.org>
parents: 1220
diff changeset
213 nchannels, // Number of channels
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
214 defSpeed, // Default speed (ticks/row)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
215 defTempo, // Default tempo (BPM)
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
216 patMode; // Pattern data format mode
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
217
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
218 /*
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
219 - After this, norders long orders table will follow, of type:
1253
a4816eb68558 Change one JSSMOD struct type Sint16 -> Uint16.
Matti Hamalainen <ccr@tnsp.org>
parents: 1248
diff changeset
220 Uint16 orderList[norders];
1127
e22d4ceb6414 Cosmetics pass, remove excess and trailing whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents: 948
diff changeset
221
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
222 - Pattern data, format depends on patMode.
1127
e22d4ceb6414 Cosmetics pass, remove excess and trailing whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents: 948
diff changeset
223
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
224 - Extended instruments (*)
1127
e22d4ceb6414 Cosmetics pass, remove excess and trailing whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents: 948
diff changeset
225
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
226 - Sample instrument headers (*)
1127
e22d4ceb6414 Cosmetics pass, remove excess and trailing whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents: 948
diff changeset
227
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
228 - Sample data (format depends) (*)
1127
e22d4ceb6414 Cosmetics pass, remove excess and trailing whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents: 948
diff changeset
229
e22d4ceb6414 Cosmetics pass, remove excess and trailing whitespace.
Matti Hamalainen <ccr@tnsp.org>
parents: 948
diff changeset
230 (*) Items are optional and may have been omitted. Fields in the
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
231 module and other headers are used to indicate if these items exist.
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
232 */
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
233 } JSSMODHeader;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
234
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
235
2002
5cec199f49f8 Remove useless __packed__ attributes.
Matti Hamalainen <ccr@tnsp.org>
parents: 1972
diff changeset
236 typedef struct
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
237 {
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
238 Uint16 frame, value;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
239 } JSSMODEnvelopePoint;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
240
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
241
2002
5cec199f49f8 Remove useless __packed__ attributes.
Matti Hamalainen <ccr@tnsp.org>
parents: 1972
diff changeset
242 typedef struct
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
243 {
1246
7bd50496c9ec Work on improved module conversion.
Matti Hamalainen <ccr@tnsp.org>
parents: 1240
diff changeset
244 Uint8
865
fc5bd0ccc260 Use struct packing and specific types for JSSMOD data.
Matti Hamalainen <ccr@tnsp.org>
parents: 796
diff changeset
245 flags,
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
246 npoints,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
247 sustain,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
248 loopS,
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
249 loopE;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
250 JSSMODEnvelopePoint points[jsetMaxEnvPoints];
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
251 } JSSMODEnvelope;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
252
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
253
2002
5cec199f49f8 Remove useless __packed__ attributes.
Matti Hamalainen <ccr@tnsp.org>
parents: 1972
diff changeset
254 typedef struct
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
255 {
1229
dff0dfddaf0a Change some JSSMOD struct member types.
Matti Hamalainen <ccr@tnsp.org>
parents: 1224
diff changeset
256 Uint8 nsamples,
dff0dfddaf0a Change some JSSMOD struct member types.
Matti Hamalainen <ccr@tnsp.org>
parents: 1224
diff changeset
257 vibratoType;
1221
e0aa979e7188 Change sizes of some JSSMOD structure members.
Matti Hamalainen <ccr@tnsp.org>
parents: 1220
diff changeset
258 Uint16 vibratoSweep,
e0aa979e7188 Change sizes of some JSSMOD structure members.
Matti Hamalainen <ccr@tnsp.org>
parents: 1220
diff changeset
259 vibratoDepth,
e0aa979e7188 Change sizes of some JSSMOD structure members.
Matti Hamalainen <ccr@tnsp.org>
parents: 1220
diff changeset
260 vibratoRate,
e0aa979e7188 Change sizes of some JSSMOD structure members.
Matti Hamalainen <ccr@tnsp.org>
parents: 1220
diff changeset
261 fadeOut;
1229
dff0dfddaf0a Change some JSSMOD struct member types.
Matti Hamalainen <ccr@tnsp.org>
parents: 1224
diff changeset
262 Uint32 sNumForNotes[jsetNNotes]; // 32bit because internally we use global indices
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
263 JSSMODEnvelope volumeEnv, panningEnv;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
264 } JSSMODExtInstrument;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
265
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
266
2002
5cec199f49f8 Remove useless __packed__ attributes.
Matti Hamalainen <ccr@tnsp.org>
parents: 1972
diff changeset
267 typedef struct
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
268 {
1236
b8c9af10b7fd Work on JSSMOD format.
Matti Hamalainen <ccr@tnsp.org>
parents: 1231
diff changeset
269 Uint32 size, // Length in units
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
270 loopS, // Loop start position in units
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
271 loopE; // Loop end position in units
1236
b8c9af10b7fd Work on JSSMOD format.
Matti Hamalainen <ccr@tnsp.org>
parents: 1231
diff changeset
272 Uint16 flags, // Flags - see jss.h jsfXXXX
1349
5adf67d1dea4 Fix loading of instrument relative note, finetune and panning values, which should be signed.
Matti Hamalainen <ccr@tnsp.org>
parents: 1253
diff changeset
273 C4BaseSpeed; // C4BaseSpeed
5adf67d1dea4 Fix loading of instrument relative note, finetune and panning values, which should be signed.
Matti Hamalainen <ccr@tnsp.org>
parents: 1253
diff changeset
274 Sint16 ERelNote, // Extended: Relative note value
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
275 EFineTune, // Extended: Fine-tune value
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
276 EPanning; // Extended: Panning
1236
b8c9af10b7fd Work on JSSMOD format.
Matti Hamalainen <ccr@tnsp.org>
parents: 1231
diff changeset
277 Uint8 volume, // Volume [jsetMinVol...jsetMaxVol]
b8c9af10b7fd Work on JSSMOD format.
Matti Hamalainen <ccr@tnsp.org>
parents: 1231
diff changeset
278 convFlags; // Conversion flags .. jsampXXXX
b8c9af10b7fd Work on JSSMOD format.
Matti Hamalainen <ccr@tnsp.org>
parents: 1231
diff changeset
279 // jsampHasData set if there is sample data
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
280 } JSSMODInstrument;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
281
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
282
1210
6b48bad13399 Rename pattern note packing flag COMP_* constants to JM_COMP_*.
Matti Hamalainen <ccr@tnsp.org>
parents: 1209
diff changeset
283 #define JM_COMP_NOTE (0x01)
6b48bad13399 Rename pattern note packing flag COMP_* constants to JM_COMP_*.
Matti Hamalainen <ccr@tnsp.org>
parents: 1209
diff changeset
284 #define JM_COMP_INSTRUMENT (0x02)
6b48bad13399 Rename pattern note packing flag COMP_* constants to JM_COMP_*.
Matti Hamalainen <ccr@tnsp.org>
parents: 1209
diff changeset
285 #define JM_COMP_VOLUME (0x04)
6b48bad13399 Rename pattern note packing flag COMP_* constants to JM_COMP_*.
Matti Hamalainen <ccr@tnsp.org>
parents: 1209
diff changeset
286 #define JM_COMP_EFFECT (0x08)
6b48bad13399 Rename pattern note packing flag COMP_* constants to JM_COMP_*.
Matti Hamalainen <ccr@tnsp.org>
parents: 1209
diff changeset
287 #define JM_COMP_PARAM (0x10)
6b48bad13399 Rename pattern note packing flag COMP_* constants to JM_COMP_*.
Matti Hamalainen <ccr@tnsp.org>
parents: 1209
diff changeset
288 #define JM_COMP_ALL (JM_COMP_NOTE | JM_COMP_INSTRUMENT | JM_COMP_VOLUME | JM_COMP_EFFECT | JM_COMP_PARAM)
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
289
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
290
2002
5cec199f49f8 Remove useless __packed__ attributes.
Matti Hamalainen <ccr@tnsp.org>
parents: 1972
diff changeset
291 typedef struct
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
292 {
1221
e0aa979e7188 Change sizes of some JSSMOD structure members.
Matti Hamalainen <ccr@tnsp.org>
parents: 1220
diff changeset
293 Uint32 size;
e0aa979e7188 Change sizes of some JSSMOD structure members.
Matti Hamalainen <ccr@tnsp.org>
parents: 1220
diff changeset
294 Uint16 nrows;
2278
40ccc09f09be Implement empty channel removal in xm2jss and make JSSMOD format support
Matti Hamalainen <ccr@tnsp.org>
parents: 2002
diff changeset
295 Uint16 nchannels; // may differ from JSSMODHeader::nchannels
40ccc09f09be Implement empty channel removal in xm2jss and make JSSMOD format support
Matti Hamalainen <ccr@tnsp.org>
parents: 2002
diff changeset
296 // IF nchannels != JSSMODHeader::nchannels, then:
40ccc09f09be Implement empty channel removal in xm2jss and make JSSMOD format support
Matti Hamalainen <ccr@tnsp.org>
parents: 2002
diff changeset
297 // Uint8 map[JSSMODPattern::nchannels];
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
298 } JSSMODPattern;
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
299
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
300 #endif
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
301
1216
f57dc769bd39 Cosmetic.
Matti Hamalainen <ccr@tnsp.org>
parents: 1215
diff changeset
302
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
303 #ifndef JSS_LIGHT
948
698ee83bac98 Constify & cleanup.
Matti Hamalainen <ccr@tnsp.org>
parents: 865
diff changeset
304 char * jssASCIItoStr(const char *src, const char endByte, const size_t len);
1972
cedb5ca1533b Clean up the sample conversion code a bit. Improve error handling in xm2jss.
Matti Hamalainen <ccr@tnsp.org>
parents: 1402
diff changeset
305 int jssEncodeSample8(Uint8 *, const size_t, const int);
cedb5ca1533b Clean up the sample conversion code a bit. Improve error handling in xm2jss.
Matti Hamalainen <ccr@tnsp.org>
parents: 1402
diff changeset
306 int jssEncodeSample16(Uint16 *, const size_t, const int);
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
307 #endif
1129
e466d10dae6d Change API of jssDecodeSample{8,16}() functions to return dmlib error codes
Matti Hamalainen <ccr@tnsp.org>
parents: 1127
diff changeset
308 int jssDecodeSample8(Uint8 *, const size_t, const int);
e466d10dae6d Change API of jssDecodeSample{8,16}() functions to return dmlib error codes
Matti Hamalainen <ccr@tnsp.org>
parents: 1127
diff changeset
309 int jssDecodeSample16(Uint16 *, const size_t, const int);
49
033c660c25f5 Restructure module playing, removing 8bit sample mixing (output can still be
Matti Hamalainen <ccr@tnsp.org>
parents: 44
diff changeset
310 int jssConvertModuleForPlaying(JSSModule *module);
1231
a275b7382ffa Cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 1230
diff changeset
311
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
312 JSSModule * jssAllocateModule(void);
1223
82cc143cb7d2 Add function argument names to prototypes.
Matti Hamalainen <ccr@tnsp.org>
parents: 1221
diff changeset
313 int jssFreeModule(JSSModule * module);
1238
e8c99da451cd Cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 1236
diff changeset
314
1223
82cc143cb7d2 Add function argument names to prototypes.
Matti Hamalainen <ccr@tnsp.org>
parents: 1221
diff changeset
315 JSSPattern * jssAllocatePattern(const int nrows, const int nchannels);
1224
e667710aee8e Add functions jssFreeInstrument(), jssFreeExtInstrument() and jssFreePattern().
Matti Hamalainen <ccr@tnsp.org>
parents: 1223
diff changeset
316 void jssFreePattern(JSSPattern *pattern);
1238
e8c99da451cd Cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 1236
diff changeset
317
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
318 JSSInstrument * jssAllocateInstrument(void);
1224
e667710aee8e Add functions jssFreeInstrument(), jssFreeExtInstrument() and jssFreePattern().
Matti Hamalainen <ccr@tnsp.org>
parents: 1223
diff changeset
319 void jssFreeInstrument(JSSInstrument *inst);
1238
e8c99da451cd Cosmetics.
Matti Hamalainen <ccr@tnsp.org>
parents: 1236
diff changeset
320
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
321 JSSExtInstrument * jssAllocateExtInstrument(void);
1224
e667710aee8e Add functions jssFreeInstrument(), jssFreeExtInstrument() and jssFreePattern().
Matti Hamalainen <ccr@tnsp.org>
parents: 1223
diff changeset
322 void jssFreeExtInstrument(JSSExtInstrument *inst);
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
323
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
324 #ifdef JSS_SUP_XM
1223
82cc143cb7d2 Add function argument names to prototypes.
Matti Hamalainen <ccr@tnsp.org>
parents: 1221
diff changeset
325 int jssLoadXM(DMResource *file, JSSModule **pmodule, BOOL probe);
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
326 #endif
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
327
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
328 #ifdef JSS_SUP_JSSMOD
1223
82cc143cb7d2 Add function argument names to prototypes.
Matti Hamalainen <ccr@tnsp.org>
parents: 1221
diff changeset
329 int jssLoadJSSMOD(DMResource *file, JSSModule **pmodule, BOOL probe);
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
330 #endif
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
331
1223
82cc143cb7d2 Add function argument names to prototypes.
Matti Hamalainen <ccr@tnsp.org>
parents: 1221
diff changeset
332
358
3bdc776a4b33 Add C++ guards.
Matti Hamalainen <ccr@tnsp.org>
parents: 56
diff changeset
333 #ifdef __cplusplus
3bdc776a4b33 Add C++ guards.
Matti Hamalainen <ccr@tnsp.org>
parents: 56
diff changeset
334 }
3bdc776a4b33 Add C++ guards.
Matti Hamalainen <ccr@tnsp.org>
parents: 56
diff changeset
335 #endif
3bdc776a4b33 Add C++ guards.
Matti Hamalainen <ccr@tnsp.org>
parents: 56
diff changeset
336
0
32250b436bca Initial re-import.
Matti Hamalainen <ccr@tnsp.org>
parents:
diff changeset
337 #endif // JSSMOD_H