Mercurial > audlegacy-plugins
annotate src/modplug/sndfile.h @ 866:d8b8b36d2709 trunk
[svn] - prevent skin list overlap when it's first populated and user quickly switchs to other tabs in the prefswin
author | giacomo |
---|---|
date | Fri, 16 Mar 2007 18:47:24 -0700 |
parents | 6b5a52635b3b |
children | 032053ca08ab b180f83e4388 |
rev | line source |
---|---|
136
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
1 /* |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
2 * This source code is public domain. |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
3 * |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
4 * Authors: Olivier Lapicque <olivierl@jps.net>, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
5 * Adam Goode <adam@evdebs.org> (endian and char fixes for PPC) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
6 */ |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
7 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
8 #ifdef HAVE_CONFIG_H |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
9 #include "config.h" |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
10 #endif |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
11 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
12 #ifndef __SNDFILE_H |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
13 #define __SNDFILE_H |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
14 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
15 #ifdef UNDER_CE |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
16 int _strnicmp(const char *str1,const char *str2, int n); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
17 #endif |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
18 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
19 #ifndef LPCBYTE |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
20 typedef const BYTE * LPCBYTE; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
21 #endif |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
22 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
23 #define MOD_AMIGAC2 0x1AB |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
24 #define MAX_SAMPLE_LENGTH 16000000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
25 #define MAX_SAMPLE_RATE 192000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
26 #define MAX_ORDERS 256 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
27 #define MAX_PATTERNS 240 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
28 #define MAX_SAMPLES 240 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
29 #define MAX_INSTRUMENTS MAX_SAMPLES |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
30 #ifdef MODPLUG_FASTSOUNDLIB |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
31 #define MAX_CHANNELS 80 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
32 #else |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
33 #define MAX_CHANNELS 128 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
34 #endif |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
35 #define MAX_BASECHANNELS 64 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
36 #define MAX_ENVPOINTS 32 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
37 #define MIN_PERIOD 0x0020 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
38 #define MAX_PERIOD 0xFFFF |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
39 #define MAX_PATTERNNAME 32 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
40 #define MAX_CHANNELNAME 20 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
41 #define MAX_INFONAME 80 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
42 #define MAX_EQ_BANDS 6 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
43 #define MAX_MIXPLUGINS 8 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
44 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
45 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
46 #define MOD_TYPE_NONE 0x00 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
47 #define MOD_TYPE_MOD 0x01 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
48 #define MOD_TYPE_S3M 0x02 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
49 #define MOD_TYPE_XM 0x04 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
50 #define MOD_TYPE_MED 0x08 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
51 #define MOD_TYPE_MTM 0x10 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
52 #define MOD_TYPE_IT 0x20 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
53 #define MOD_TYPE_669 0x40 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
54 #define MOD_TYPE_ULT 0x80 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
55 #define MOD_TYPE_STM 0x100 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
56 #define MOD_TYPE_FAR 0x200 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
57 #define MOD_TYPE_WAV 0x400 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
58 #define MOD_TYPE_AMF 0x800 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
59 #define MOD_TYPE_AMS 0x1000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
60 #define MOD_TYPE_DSM 0x2000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
61 #define MOD_TYPE_MDL 0x4000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
62 #define MOD_TYPE_OKT 0x8000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
63 #define MOD_TYPE_MID 0x10000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
64 #define MOD_TYPE_DMF 0x20000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
65 #define MOD_TYPE_PTM 0x40000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
66 #define MOD_TYPE_DBM 0x80000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
67 #define MOD_TYPE_MT2 0x100000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
68 #define MOD_TYPE_AMF0 0x200000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
69 #define MOD_TYPE_PSM 0x400000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
70 #define MOD_TYPE_J2B 0x800000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
71 #define MOD_TYPE_UMX 0x80000000 // Fake type |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
72 #define MAX_MODTYPE 23 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
73 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
74 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
75 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
76 // Channel flags: |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
77 // Bits 0-7: Sample Flags |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
78 #define CHN_16BIT 0x01 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
79 #define CHN_LOOP 0x02 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
80 #define CHN_PINGPONGLOOP 0x04 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
81 #define CHN_SUSTAINLOOP 0x08 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
82 #define CHN_PINGPONGSUSTAIN 0x10 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
83 #define CHN_PANNING 0x20 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
84 #define CHN_STEREO 0x40 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
85 #define CHN_PINGPONGFLAG 0x80 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
86 // Bits 8-31: Channel Flags |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
87 #define CHN_MUTE 0x100 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
88 #define CHN_KEYOFF 0x200 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
89 #define CHN_NOTEFADE 0x400 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
90 #define CHN_SURROUND 0x800 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
91 #define CHN_NOIDO 0x1000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
92 #define CHN_HQSRC 0x2000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
93 #define CHN_FILTER 0x4000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
94 #define CHN_VOLUMERAMP 0x8000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
95 #define CHN_VIBRATO 0x10000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
96 #define CHN_TREMOLO 0x20000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
97 #define CHN_PANBRELLO 0x40000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
98 #define CHN_PORTAMENTO 0x80000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
99 #define CHN_GLISSANDO 0x100000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
100 #define CHN_VOLENV 0x200000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
101 #define CHN_PANENV 0x400000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
102 #define CHN_PITCHENV 0x800000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
103 #define CHN_FASTVOLRAMP 0x1000000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
104 #define CHN_EXTRALOUD 0x2000000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
105 #define CHN_REVERB 0x4000000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
106 #define CHN_NOREVERB 0x8000000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
107 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
108 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
109 #define ENV_VOLUME 0x0001 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
110 #define ENV_VOLSUSTAIN 0x0002 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
111 #define ENV_VOLLOOP 0x0004 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
112 #define ENV_PANNING 0x0008 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
113 #define ENV_PANSUSTAIN 0x0010 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
114 #define ENV_PANLOOP 0x0020 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
115 #define ENV_PITCH 0x0040 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
116 #define ENV_PITCHSUSTAIN 0x0080 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
117 #define ENV_PITCHLOOP 0x0100 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
118 #define ENV_SETPANNING 0x0200 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
119 #define ENV_FILTER 0x0400 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
120 #define ENV_VOLCARRY 0x0800 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
121 #define ENV_PANCARRY 0x1000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
122 #define ENV_PITCHCARRY 0x2000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
123 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
124 #define CMD_NONE 0 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
125 #define CMD_ARPEGGIO 1 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
126 #define CMD_PORTAMENTOUP 2 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
127 #define CMD_PORTAMENTODOWN 3 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
128 #define CMD_TONEPORTAMENTO 4 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
129 #define CMD_VIBRATO 5 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
130 #define CMD_TONEPORTAVOL 6 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
131 #define CMD_VIBRATOVOL 7 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
132 #define CMD_TREMOLO 8 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
133 #define CMD_PANNING8 9 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
134 #define CMD_OFFSET 10 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
135 #define CMD_VOLUMESLIDE 11 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
136 #define CMD_POSITIONJUMP 12 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
137 #define CMD_VOLUME 13 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
138 #define CMD_PATTERNBREAK 14 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
139 #define CMD_RETRIG 15 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
140 #define CMD_SPEED 16 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
141 #define CMD_TEMPO 17 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
142 #define CMD_TREMOR 18 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
143 #define CMD_MODCMDEX 19 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
144 #define CMD_S3MCMDEX 20 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
145 #define CMD_CHANNELVOLUME 21 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
146 #define CMD_CHANNELVOLSLIDE 22 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
147 #define CMD_GLOBALVOLUME 23 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
148 #define CMD_GLOBALVOLSLIDE 24 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
149 #define CMD_KEYOFF 25 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
150 #define CMD_FINEVIBRATO 26 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
151 #define CMD_PANBRELLO 27 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
152 #define CMD_XFINEPORTAUPDOWN 28 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
153 #define CMD_PANNINGSLIDE 29 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
154 #define CMD_SETENVPOSITION 30 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
155 #define CMD_MIDI 31 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
156 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
157 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
158 // Volume Column commands |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
159 #define VOLCMD_VOLUME 1 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
160 #define VOLCMD_PANNING 2 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
161 #define VOLCMD_VOLSLIDEUP 3 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
162 #define VOLCMD_VOLSLIDEDOWN 4 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
163 #define VOLCMD_FINEVOLUP 5 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
164 #define VOLCMD_FINEVOLDOWN 6 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
165 #define VOLCMD_VIBRATOSPEED 7 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
166 #define VOLCMD_VIBRATO 8 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
167 #define VOLCMD_PANSLIDELEFT 9 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
168 #define VOLCMD_PANSLIDERIGHT 10 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
169 #define VOLCMD_TONEPORTAMENTO 11 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
170 #define VOLCMD_PORTAUP 12 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
171 #define VOLCMD_PORTADOWN 13 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
172 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
173 #define RSF_16BIT 0x04 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
174 #define RSF_STEREO 0x08 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
175 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
176 #define RS_PCM8S 0 // 8-bit signed |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
177 #define RS_PCM8U 1 // 8-bit unsigned |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
178 #define RS_PCM8D 2 // 8-bit delta values |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
179 #define RS_ADPCM4 3 // 4-bit ADPCM-packed |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
180 #define RS_PCM16D 4 // 16-bit delta values |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
181 #define RS_PCM16S 5 // 16-bit signed |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
182 #define RS_PCM16U 6 // 16-bit unsigned |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
183 #define RS_PCM16M 7 // 16-bit motorola order |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
184 #define RS_STPCM8S (RS_PCM8S|RSF_STEREO) // stereo 8-bit signed |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
185 #define RS_STPCM8U (RS_PCM8U|RSF_STEREO) // stereo 8-bit unsigned |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
186 #define RS_STPCM8D (RS_PCM8D|RSF_STEREO) // stereo 8-bit delta values |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
187 #define RS_STPCM16S (RS_PCM16S|RSF_STEREO) // stereo 16-bit signed |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
188 #define RS_STPCM16U (RS_PCM16U|RSF_STEREO) // stereo 16-bit unsigned |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
189 #define RS_STPCM16D (RS_PCM16D|RSF_STEREO) // stereo 16-bit delta values |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
190 #define RS_STPCM16M (RS_PCM16M|RSF_STEREO) // stereo 16-bit signed big endian |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
191 // IT 2.14 compressed samples |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
192 #define RS_IT2148 0x10 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
193 #define RS_IT21416 0x14 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
194 #define RS_IT2158 0x12 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
195 #define RS_IT21516 0x16 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
196 // AMS Packed Samples |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
197 #define RS_AMS8 0x11 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
198 #define RS_AMS16 0x15 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
199 // DMF Huffman compression |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
200 #define RS_DMF8 0x13 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
201 #define RS_DMF16 0x17 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
202 // MDL Huffman compression |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
203 #define RS_MDL8 0x20 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
204 #define RS_MDL16 0x24 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
205 #define RS_PTM8DTO16 0x25 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
206 // Stereo Interleaved Samples |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
207 #define RS_STIPCM8S (RS_PCM8S|0x40|RSF_STEREO) // stereo 8-bit signed |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
208 #define RS_STIPCM8U (RS_PCM8U|0x40|RSF_STEREO) // stereo 8-bit unsigned |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
209 #define RS_STIPCM16S (RS_PCM16S|0x40|RSF_STEREO) // stereo 16-bit signed |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
210 #define RS_STIPCM16U (RS_PCM16U|0x40|RSF_STEREO) // stereo 16-bit unsigned |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
211 #define RS_STIPCM16M (RS_PCM16M|0x40|RSF_STEREO) // stereo 16-bit signed big endian |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
212 // 24-bit signed |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
213 #define RS_PCM24S (RS_PCM16S|0x80) // mono 24-bit signed |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
214 #define RS_STIPCM24S (RS_PCM16S|0x80|RSF_STEREO) // stereo 24-bit signed |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
215 #define RS_PCM32S (RS_PCM16S|0xC0) // mono 24-bit signed |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
216 #define RS_STIPCM32S (RS_PCM16S|0xC0|RSF_STEREO) // stereo 24-bit signed |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
217 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
218 // NNA types |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
219 #define NNA_NOTECUT 0 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
220 #define NNA_CONTINUE 1 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
221 #define NNA_NOTEOFF 2 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
222 #define NNA_NOTEFADE 3 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
223 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
224 // DCT types |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
225 #define DCT_NONE 0 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
226 #define DCT_NOTE 1 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
227 #define DCT_SAMPLE 2 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
228 #define DCT_INSTRUMENT 3 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
229 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
230 // DNA types |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
231 #define DNA_NOTECUT 0 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
232 #define DNA_NOTEOFF 1 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
233 #define DNA_NOTEFADE 2 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
234 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
235 // Mixer Hardware-Dependent features |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
236 #define SYSMIX_ENABLEMMX 0x01 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
237 #define SYSMIX_WINDOWSNT 0x02 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
238 #define SYSMIX_SLOWCPU 0x04 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
239 #define SYSMIX_FASTCPU 0x08 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
240 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
241 // Module flags |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
242 #define SONG_EMBEDMIDICFG 0x0001 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
243 #define SONG_FASTVOLSLIDES 0x0002 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
244 #define SONG_ITOLDEFFECTS 0x0004 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
245 #define SONG_ITCOMPATMODE 0x0008 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
246 #define SONG_LINEARSLIDES 0x0010 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
247 #define SONG_PATTERNLOOP 0x0020 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
248 #define SONG_STEP 0x0040 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
249 #define SONG_PAUSED 0x0080 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
250 #define SONG_FADINGSONG 0x0100 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
251 #define SONG_ENDREACHED 0x0200 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
252 #define SONG_GLOBALFADE 0x0400 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
253 #define SONG_CPUVERYHIGH 0x0800 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
254 #define SONG_FIRSTTICK 0x1000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
255 #define SONG_MPTFILTERMODE 0x2000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
256 #define SONG_SURROUNDPAN 0x4000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
257 #define SONG_EXFILTERRANGE 0x8000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
258 #define SONG_AMIGALIMITS 0x10000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
259 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
260 // Global Options (Renderer) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
261 #define SNDMIX_REVERSESTEREO 0x0001 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
262 #define SNDMIX_NOISEREDUCTION 0x0002 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
263 #define SNDMIX_AGC 0x0004 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
264 #define SNDMIX_NORESAMPLING 0x0008 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
265 #define SNDMIX_HQRESAMPLER 0x0010 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
266 #define SNDMIX_MEGABASS 0x0020 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
267 #define SNDMIX_SURROUND 0x0040 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
268 #define SNDMIX_REVERB 0x0080 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
269 #define SNDMIX_EQ 0x0100 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
270 #define SNDMIX_SOFTPANNING 0x0200 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
271 #define SNDMIX_ULTRAHQSRCMODE 0x0400 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
272 // Misc Flags (can safely be turned on or off) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
273 #define SNDMIX_DIRECTTODISK 0x10000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
274 #define SNDMIX_ENABLEMMX 0x20000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
275 #define SNDMIX_NOBACKWARDJUMPS 0x40000 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
276 #define SNDMIX_MAXDEFAULTPAN 0x80000 // Used by the MOD loader |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
277 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
278 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
279 // Reverb Types (GM2 Presets) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
280 enum { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
281 REVERBTYPE_SMALLROOM, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
282 REVERBTYPE_MEDIUMROOM, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
283 REVERBTYPE_LARGEROOM, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
284 REVERBTYPE_SMALLHALL, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
285 REVERBTYPE_MEDIUMHALL, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
286 REVERBTYPE_LARGEHALL, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
287 NUM_REVERBTYPES |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
288 }; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
289 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
290 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
291 enum { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
292 SRCMODE_NEAREST, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
293 SRCMODE_LINEAR, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
294 SRCMODE_SPLINE, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
295 SRCMODE_POLYPHASE, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
296 NUM_SRC_MODES |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
297 }; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
298 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
299 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
300 // Sample Struct |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
301 typedef struct _MODINSTRUMENT |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
302 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
303 UINT nLength,nLoopStart,nLoopEnd; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
304 UINT nSustainStart, nSustainEnd; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
305 signed char *pSample; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
306 UINT nC4Speed; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
307 WORD nPan; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
308 WORD nVolume; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
309 WORD nGlobalVol; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
310 WORD uFlags; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
311 signed char RelativeTone; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
312 signed char nFineTune; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
313 BYTE nVibType; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
314 BYTE nVibSweep; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
315 BYTE nVibDepth; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
316 BYTE nVibRate; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
317 CHAR name[22]; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
318 } MODINSTRUMENT; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
319 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
320 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
321 // Instrument Struct |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
322 typedef struct _INSTRUMENTHEADER |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
323 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
324 UINT nFadeOut; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
325 DWORD dwFlags; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
326 WORD nGlobalVol; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
327 WORD nPan; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
328 WORD VolPoints[MAX_ENVPOINTS]; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
329 WORD PanPoints[MAX_ENVPOINTS]; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
330 WORD PitchPoints[MAX_ENVPOINTS]; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
331 BYTE VolEnv[MAX_ENVPOINTS]; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
332 BYTE PanEnv[MAX_ENVPOINTS]; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
333 BYTE PitchEnv[MAX_ENVPOINTS]; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
334 BYTE Keyboard[128]; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
335 BYTE NoteMap[128]; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
336 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
337 BYTE nVolEnv; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
338 BYTE nPanEnv; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
339 BYTE nPitchEnv; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
340 BYTE nVolLoopStart; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
341 BYTE nVolLoopEnd; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
342 BYTE nVolSustainBegin; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
343 BYTE nVolSustainEnd; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
344 BYTE nPanLoopStart; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
345 BYTE nPanLoopEnd; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
346 BYTE nPanSustainBegin; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
347 BYTE nPanSustainEnd; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
348 BYTE nPitchLoopStart; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
349 BYTE nPitchLoopEnd; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
350 BYTE nPitchSustainBegin; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
351 BYTE nPitchSustainEnd; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
352 BYTE nNNA; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
353 BYTE nDCT; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
354 BYTE nDNA; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
355 BYTE nPanSwing; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
356 BYTE nVolSwing; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
357 BYTE nIFC; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
358 BYTE nIFR; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
359 WORD wMidiBank; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
360 BYTE nMidiProgram; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
361 BYTE nMidiChannel; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
362 BYTE nMidiDrumKey; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
363 signed char nPPS; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
364 unsigned char nPPC; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
365 CHAR name[32]; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
366 CHAR filename[12]; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
367 } INSTRUMENTHEADER; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
368 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
369 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
370 // Channel Struct |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
371 typedef struct _MODCHANNEL |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
372 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
373 // First 32-bytes: Most used mixing information: don't change it |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
374 signed char * pCurrentSample; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
375 DWORD nPos; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
376 DWORD nPosLo; // actually 16-bit |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
377 LONG nInc; // 16.16 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
378 LONG nRightVol; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
379 LONG nLeftVol; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
380 LONG nRightRamp; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
381 LONG nLeftRamp; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
382 // 2nd cache line |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
383 DWORD nLength; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
384 DWORD dwFlags; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
385 DWORD nLoopStart; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
386 DWORD nLoopEnd; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
387 LONG nRampRightVol; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
388 LONG nRampLeftVol; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
389 LONG nFilter_Y1, nFilter_Y2, nFilter_Y3, nFilter_Y4; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
390 LONG nFilter_A0, nFilter_B0, nFilter_B1; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
391 LONG nROfs, nLOfs; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
392 LONG nRampLength; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
393 // Information not used in the mixer |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
394 signed char * pSample; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
395 LONG nNewRightVol, nNewLeftVol; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
396 LONG nRealVolume, nRealPan; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
397 LONG nVolume, nPan, nFadeOutVol; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
398 LONG nPeriod, nC4Speed, nPortamentoDest; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
399 INSTRUMENTHEADER *pHeader; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
400 MODINSTRUMENT *pInstrument; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
401 DWORD nVolEnvPosition, nPanEnvPosition, nPitchEnvPosition; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
402 DWORD nMasterChn, nVUMeter; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
403 LONG nGlobalVol, nInsVol; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
404 LONG nFineTune, nTranspose; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
405 LONG nPortamentoSlide, nAutoVibDepth; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
406 UINT nAutoVibPos, nVibratoPos, nTremoloPos, nPanbrelloPos; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
407 // 16-bit members |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
408 signed short nVolSwing, nPanSwing; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
409 // 8-bit members |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
410 BYTE nNote, nNNA; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
411 BYTE nNewNote, nNewIns, nCommand, nArpeggio; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
412 BYTE nOldVolumeSlide, nOldFineVolUpDown; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
413 BYTE nOldPortaUpDown, nOldFinePortaUpDown; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
414 BYTE nOldPanSlide, nOldChnVolSlide; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
415 BYTE nVibratoType, nVibratoSpeed, nVibratoDepth; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
416 BYTE nTremoloType, nTremoloSpeed, nTremoloDepth; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
417 BYTE nPanbrelloType, nPanbrelloSpeed, nPanbrelloDepth; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
418 BYTE nOldCmdEx, nOldVolParam, nOldTempo; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
419 BYTE nOldOffset, nOldHiOffset; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
420 BYTE nCutOff, nResonance; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
421 BYTE nRetrigCount, nRetrigParam; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
422 BYTE nTremorCount, nTremorParam; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
423 BYTE nPatternLoop, nPatternLoopCount; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
424 BYTE nRowNote, nRowInstr; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
425 BYTE nRowVolCmd, nRowVolume; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
426 BYTE nRowCommand, nRowParam; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
427 BYTE nLeftVU, nRightVU; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
428 BYTE nActiveMacro, nPadding; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
429 } MODCHANNEL; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
430 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
431 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
432 typedef struct _MODCHANNELSETTINGS |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
433 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
434 UINT nPan; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
435 UINT nVolume; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
436 DWORD dwFlags; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
437 UINT nMixPlugin; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
438 char szName[MAX_CHANNELNAME]; // changed from CHAR |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
439 } MODCHANNELSETTINGS; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
440 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
441 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
442 typedef struct _MODCOMMAND |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
443 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
444 BYTE note; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
445 BYTE instr; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
446 BYTE volcmd; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
447 BYTE command; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
448 BYTE vol; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
449 BYTE param; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
450 } MODCOMMAND, *LPMODCOMMAND; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
451 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
452 //////////////////////////////////////////////////////////////////// |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
453 // Mix Plugins |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
454 #define MIXPLUG_MIXREADY 0x01 // Set when cleared |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
455 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
456 class IMixPlugin |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
457 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
458 public: |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
459 virtual int AddRef() = 0; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
460 virtual int Release() = 0; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
461 virtual void SaveAllParameters() = 0; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
462 virtual void RestoreAllParameters() = 0; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
463 virtual void Process(float *pOutL, float *pOutR, unsigned long nSamples) = 0; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
464 virtual void Init(unsigned long nFreq, int bReset) = 0; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
465 virtual void MidiSend(DWORD dwMidiCode) = 0; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
466 virtual void MidiCommand(UINT nMidiCh, UINT nMidiProg, UINT note, UINT vol) = 0; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
467 }; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
468 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
469 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
470 #define MIXPLUG_INPUTF_MASTEREFFECT 0x01 // Apply to master mix |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
471 #define MIXPLUG_INPUTF_BYPASS 0x02 // Bypass effect |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
472 #define MIXPLUG_INPUTF_WETMIX 0x04 // Wet Mix (dry added) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
473 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
474 typedef struct _SNDMIXPLUGINSTATE |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
475 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
476 DWORD dwFlags; // MIXPLUG_XXXX |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
477 LONG nVolDecayL, nVolDecayR; // Buffer click removal |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
478 int *pMixBuffer; // Stereo effect send buffer |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
479 float *pOutBufferL; // Temp storage for int -> float conversion |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
480 float *pOutBufferR; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
481 } SNDMIXPLUGINSTATE, *PSNDMIXPLUGINSTATE; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
482 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
483 typedef struct _SNDMIXPLUGININFO |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
484 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
485 DWORD dwPluginId1; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
486 DWORD dwPluginId2; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
487 DWORD dwInputRouting; // MIXPLUG_INPUTF_XXXX |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
488 DWORD dwOutputRouting; // 0=mix 0x80+=fx |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
489 DWORD dwReserved[4]; // Reserved for routing info |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
490 CHAR szName[32]; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
491 CHAR szLibraryName[64]; // original DLL name |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
492 } SNDMIXPLUGININFO, *PSNDMIXPLUGININFO; // Size should be 128 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
493 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
494 typedef struct _SNDMIXPLUGIN |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
495 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
496 IMixPlugin *pMixPlugin; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
497 PSNDMIXPLUGINSTATE pMixState; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
498 ULONG nPluginDataSize; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
499 PVOID pPluginData; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
500 SNDMIXPLUGININFO Info; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
501 } SNDMIXPLUGIN, *PSNDMIXPLUGIN; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
502 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
503 typedef BOOL (*PMIXPLUGINCREATEPROC)(PSNDMIXPLUGIN); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
504 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
505 //////////////////////////////////////////////////////////////////// |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
506 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
507 enum { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
508 MIDIOUT_START=0, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
509 MIDIOUT_STOP, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
510 MIDIOUT_TICK, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
511 MIDIOUT_NOTEON, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
512 MIDIOUT_NOTEOFF, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
513 MIDIOUT_VOLUME, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
514 MIDIOUT_PAN, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
515 MIDIOUT_BANKSEL, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
516 MIDIOUT_PROGRAM, |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
517 }; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
518 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
519 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
520 typedef struct MODMIDICFG |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
521 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
522 char szMidiGlb[9*32]; // changed from CHAR |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
523 char szMidiSFXExt[16*32]; // changed from CHAR |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
524 char szMidiZXXExt[128*32]; // changed from CHAR |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
525 } MODMIDICFG, *LPMODMIDICFG; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
526 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
527 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
528 typedef VOID (* LPSNDMIXHOOKPROC)(int *, unsigned long, unsigned long); // buffer, samples, channels |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
529 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
530 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
531 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
532 //============== |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
533 class CSoundFile |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
534 //============== |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
535 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
536 public: // Static Members |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
537 static UINT m_nXBassDepth, m_nXBassRange; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
538 static UINT m_nReverbDepth, m_nReverbDelay, gnReverbType; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
539 static UINT m_nProLogicDepth, m_nProLogicDelay; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
540 static UINT m_nStereoSeparation; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
541 static UINT m_nMaxMixChannels; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
542 static LONG m_nStreamVolume; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
543 static DWORD gdwSysInfo, gdwSoundSetup, gdwMixingFreq, gnBitsPerSample, gnChannels; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
544 static UINT gnAGC, gnVolumeRampSamples, gnVUMeter, gnCPUUsage; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
545 static LPSNDMIXHOOKPROC gpSndMixHook; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
546 static PMIXPLUGINCREATEPROC gpMixPluginCreateProc; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
547 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
548 public: // for Editing |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
549 MODCHANNEL Chn[MAX_CHANNELS]; // Channels |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
550 UINT ChnMix[MAX_CHANNELS]; // Channels to be mixed |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
551 MODINSTRUMENT Ins[MAX_SAMPLES]; // Instruments |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
552 INSTRUMENTHEADER *Headers[MAX_INSTRUMENTS]; // Instrument Headers |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
553 MODCHANNELSETTINGS ChnSettings[MAX_BASECHANNELS]; // Channels settings |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
554 MODCOMMAND *Patterns[MAX_PATTERNS]; // Patterns |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
555 WORD PatternSize[MAX_PATTERNS]; // Patterns Lengths |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
556 BYTE Order[MAX_ORDERS]; // Pattern Orders |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
557 MODMIDICFG m_MidiCfg; // Midi macro config table |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
558 SNDMIXPLUGIN m_MixPlugins[MAX_MIXPLUGINS]; // Mix plugins |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
559 UINT m_nDefaultSpeed, m_nDefaultTempo, m_nDefaultGlobalVolume; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
560 DWORD m_dwSongFlags; // Song flags SONG_XXXX |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
561 UINT m_nChannels, m_nMixChannels, m_nMixStat, m_nBufferCount; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
562 UINT m_nType, m_nSamples, m_nInstruments; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
563 UINT m_nTickCount, m_nTotalCount, m_nPatternDelay, m_nFrameDelay; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
564 UINT m_nMusicSpeed, m_nMusicTempo; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
565 UINT m_nNextRow, m_nRow; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
566 UINT m_nPattern,m_nCurrentPattern,m_nNextPattern,m_nRestartPos; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
567 UINT m_nMasterVolume, m_nGlobalVolume, m_nSongPreAmp; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
568 UINT m_nFreqFactor, m_nTempoFactor, m_nOldGlbVolSlide; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
569 LONG m_nMinPeriod, m_nMaxPeriod, m_nRepeatCount, m_nInitialRepeatCount; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
570 DWORD m_nGlobalFadeSamples, m_nGlobalFadeMaxSamples; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
571 UINT m_nMaxOrderPosition; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
572 UINT m_nPatternNames; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
573 LPSTR m_lpszSongComments, m_lpszPatternNames; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
574 char m_szNames[MAX_INSTRUMENTS][32]; // changed from CHAR |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
575 CHAR CompressionTable[16]; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
576 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
577 public: |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
578 CSoundFile(); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
579 ~CSoundFile(); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
580 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
581 public: |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
582 BOOL Create(LPCBYTE lpStream, DWORD dwMemLength=0); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
583 BOOL Destroy(); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
584 UINT GetType() const { return m_nType; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
585 UINT GetNumChannels() const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
586 UINT GetLogicalChannels() const { return m_nChannels; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
587 BOOL SetMasterVolume(UINT vol, BOOL bAdjustAGC=FALSE); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
588 UINT GetMasterVolume() const { return m_nMasterVolume; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
589 UINT GetNumPatterns() const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
590 UINT GetNumInstruments() const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
591 UINT GetNumSamples() const { return m_nSamples; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
592 UINT GetCurrentPos() const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
593 UINT GetCurrentPattern() const { return m_nPattern; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
594 UINT GetCurrentOrder() const { return m_nCurrentPattern; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
595 UINT GetSongComments(LPSTR s, UINT cbsize, UINT linesize=32); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
596 UINT GetRawSongComments(LPSTR s, UINT cbsize, UINT linesize=32); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
597 UINT GetMaxPosition() const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
598 void SetCurrentPos(UINT nPos); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
599 void SetCurrentOrder(UINT nOrder); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
600 void GetTitle(LPSTR s) const { lstrcpyn(s,m_szNames[0],32); } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
601 LPCSTR GetTitle() const { return m_szNames[0]; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
602 UINT GetSampleName(UINT nSample,LPSTR s=NULL) const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
603 UINT GetInstrumentName(UINT nInstr,LPSTR s=NULL) const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
604 UINT GetMusicSpeed() const { return m_nMusicSpeed; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
605 UINT GetMusicTempo() const { return m_nMusicTempo; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
606 DWORD GetLength(BOOL bAdjust, BOOL bTotal=FALSE); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
607 DWORD GetSongTime() { return GetLength(FALSE, TRUE); } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
608 void SetRepeatCount(int n) { m_nRepeatCount = n; m_nInitialRepeatCount = n; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
609 int GetRepeatCount() const { return m_nRepeatCount; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
610 BOOL IsPaused() const { return (m_dwSongFlags & SONG_PAUSED) ? TRUE : FALSE; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
611 void LoopPattern(int nPat, int nRow=0); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
612 void CheckCPUUsage(UINT nCPU); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
613 BOOL SetPatternName(UINT nPat, LPCSTR lpszName); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
614 BOOL GetPatternName(UINT nPat, LPSTR lpszName, UINT cbSize=MAX_PATTERNNAME) const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
615 // Module Loaders |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
616 BOOL ReadXM(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
617 BOOL ReadS3M(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
618 BOOL ReadMod(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
619 BOOL ReadMed(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
620 BOOL ReadMTM(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
621 BOOL ReadSTM(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
622 BOOL ReadIT(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
623 BOOL Read669(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
624 BOOL ReadUlt(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
625 BOOL ReadWav(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
626 BOOL ReadDSM(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
627 BOOL ReadFAR(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
628 BOOL ReadAMS(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
629 BOOL ReadAMS2(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
630 BOOL ReadMDL(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
631 BOOL ReadOKT(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
632 BOOL ReadDMF(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
633 BOOL ReadPTM(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
634 BOOL ReadDBM(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
635 BOOL ReadAMF(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
636 BOOL ReadMT2(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
637 BOOL ReadPSM(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
638 BOOL ReadJ2B(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
639 BOOL ReadUMX(LPCBYTE lpStream, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
640 // Save Functions |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
641 #ifndef MODPLUG_NO_FILESAVE |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
642 UINT WriteSample(FILE *f, MODINSTRUMENT *pins, UINT nFlags, UINT nMaxLen=0); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
643 BOOL SaveXM(LPCSTR lpszFileName, UINT nPacking=0); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
644 BOOL SaveS3M(LPCSTR lpszFileName, UINT nPacking=0); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
645 BOOL SaveMod(LPCSTR lpszFileName, UINT nPacking=0); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
646 BOOL SaveIT(LPCSTR lpszFileName, UINT nPacking=0); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
647 #endif // MODPLUG_NO_FILESAVE |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
648 // MOD Convert function |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
649 UINT GetBestSaveFormat() const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
650 UINT GetSaveFormats() const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
651 void ConvertModCommand(MODCOMMAND *) const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
652 void S3MConvert(MODCOMMAND *m, BOOL bIT) const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
653 void S3MSaveConvert(UINT *pcmd, UINT *pprm, BOOL bIT) const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
654 WORD ModSaveCommand(const MODCOMMAND *m, BOOL bXM) const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
655 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
656 public: |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
657 // Real-time sound functions |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
658 VOID ResetChannels(); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
659 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
660 UINT Read(LPVOID lpBuffer, UINT cbBuffer); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
661 UINT CreateStereoMix(int count); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
662 BOOL FadeSong(UINT msec); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
663 BOOL GlobalFadeSong(UINT msec); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
664 UINT GetTotalTickCount() const { return m_nTotalCount; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
665 VOID ResetTotalTickCount() { m_nTotalCount = 0; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
666 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
667 public: |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
668 // Mixer Config |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
669 static BOOL InitPlayer(BOOL bReset=FALSE); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
670 static BOOL SetWaveConfig(UINT nRate,UINT nBits,UINT nChannels,BOOL bMMX=FALSE); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
671 static BOOL SetResamplingMode(UINT nMode); // SRCMODE_XXXX |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
672 static BOOL IsStereo() { return (gnChannels > 1) ? TRUE : FALSE; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
673 static DWORD GetSampleRate() { return gdwMixingFreq; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
674 static DWORD GetBitsPerSample() { return gnBitsPerSample; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
675 static DWORD InitSysInfo(); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
676 static DWORD GetSysInfo() { return gdwSysInfo; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
677 // AGC |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
678 static BOOL GetAGC() { return (gdwSoundSetup & SNDMIX_AGC) ? TRUE : FALSE; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
679 static void SetAGC(BOOL b); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
680 static void ResetAGC(); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
681 static void ProcessAGC(int count); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
682 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
683 //GCCFIX -- added these functions back in! |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
684 static BOOL SetWaveConfigEx(BOOL bSurround,BOOL bNoOverSampling,BOOL bReverb,BOOL hqido,BOOL bMegaBass,BOOL bNR,BOOL bEQ); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
685 // DSP Effects |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
686 static void InitializeDSP(BOOL bReset); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
687 static void ProcessStereoDSP(int count); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
688 static void ProcessMonoDSP(int count); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
689 // [Reverb level 0(quiet)-100(loud)], [delay in ms, usually 40-200ms] |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
690 static BOOL SetReverbParameters(UINT nDepth, UINT nDelay); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
691 // [XBass level 0(quiet)-100(loud)], [cutoff in Hz 10-100] |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
692 static BOOL SetXBassParameters(UINT nDepth, UINT nRange); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
693 // [Surround level 0(quiet)-100(heavy)] [delay in ms, usually 5-40ms] |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
694 static BOOL SetSurroundParameters(UINT nDepth, UINT nDelay); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
695 public: |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
696 BOOL ReadNote(); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
697 BOOL ProcessRow(); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
698 BOOL ProcessEffects(); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
699 UINT GetNNAChannel(UINT nChn) const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
700 void CheckNNA(UINT nChn, UINT instr, int note, BOOL bForceCut); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
701 void NoteChange(UINT nChn, int note, BOOL bPorta=FALSE, BOOL bResetEnv=TRUE); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
702 void InstrumentChange(MODCHANNEL *pChn, UINT instr, BOOL bPorta=FALSE,BOOL bUpdVol=TRUE,BOOL bResetEnv=TRUE); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
703 // Channel Effects |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
704 void PortamentoUp(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
705 void PortamentoDown(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
706 void FinePortamentoUp(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
707 void FinePortamentoDown(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
708 void ExtraFinePortamentoUp(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
709 void ExtraFinePortamentoDown(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
710 void TonePortamento(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
711 void Vibrato(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
712 void FineVibrato(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
713 void VolumeSlide(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
714 void PanningSlide(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
715 void ChannelVolSlide(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
716 void FineVolumeUp(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
717 void FineVolumeDown(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
718 void Tremolo(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
719 void Panbrello(MODCHANNEL *pChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
720 void RetrigNote(UINT nChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
721 void NoteCut(UINT nChn, UINT nTick); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
722 void KeyOff(UINT nChn); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
723 int PatternLoop(MODCHANNEL *, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
724 void ExtendedMODCommands(UINT nChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
725 void ExtendedS3MCommands(UINT nChn, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
726 void ExtendedChannelEffect(MODCHANNEL *, UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
727 void ProcessMidiMacro(UINT nChn, LPCSTR pszMidiMacro, UINT param=0); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
728 void SetupChannelFilter(MODCHANNEL *pChn, BOOL bReset, int flt_modifier=256) const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
729 // Low-Level effect processing |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
730 void DoFreqSlide(MODCHANNEL *pChn, LONG nFreqSlide); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
731 // Global Effects |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
732 void SetTempo(UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
733 void SetSpeed(UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
734 void GlobalVolSlide(UINT param); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
735 DWORD IsSongFinished(UINT nOrder, UINT nRow) const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
736 BOOL IsValidBackwardJump(UINT nStartOrder, UINT nStartRow, UINT nJumpOrder, UINT nJumpRow) const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
737 // Read/Write sample functions |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
738 signed char GetDeltaValue(signed char prev, UINT n) const { return (signed char)(prev + CompressionTable[n & 0x0F]); } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
739 UINT PackSample(int &sample, int next); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
740 BOOL CanPackSample(LPSTR pSample, UINT nLen, UINT nPacking, BYTE *result=NULL); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
741 UINT ReadSample(MODINSTRUMENT *pIns, UINT nFlags, LPCSTR pMemFile, DWORD dwMemLength); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
742 BOOL DestroySample(UINT nSample); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
743 BOOL DestroyInstrument(UINT nInstr); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
744 BOOL IsSampleUsed(UINT nSample); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
745 BOOL IsInstrumentUsed(UINT nInstr); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
746 BOOL RemoveInstrumentSamples(UINT nInstr); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
747 UINT DetectUnusedSamples(BOOL *); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
748 BOOL RemoveSelectedSamples(BOOL *); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
749 void AdjustSampleLoop(MODINSTRUMENT *pIns); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
750 // I/O from another sound file |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
751 BOOL ReadInstrumentFromSong(UINT nInstr, CSoundFile *, UINT nSrcInstrument); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
752 BOOL ReadSampleFromSong(UINT nSample, CSoundFile *, UINT nSrcSample); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
753 // Period/Note functions |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
754 UINT GetNoteFromPeriod(UINT period) const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
755 UINT GetPeriodFromNote(UINT note, int nFineTune, UINT nC4Speed) const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
756 UINT GetFreqFromPeriod(UINT period, UINT nC4Speed, int nPeriodFrac=0) const; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
757 // Misc functions |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
758 MODINSTRUMENT *GetSample(UINT n) { return Ins+n; } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
759 void ResetMidiCfg(); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
760 UINT MapMidiInstrument(DWORD dwProgram, UINT nChannel, UINT nNote); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
761 BOOL ITInstrToMPT(const void *p, INSTRUMENTHEADER *penv, UINT trkvers); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
762 UINT SaveMixPlugins(FILE *f=NULL, BOOL bUpdate=TRUE); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
763 UINT LoadMixPlugins(const void *pData, UINT nLen); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
764 #ifndef NO_FILTER |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
765 DWORD CutOffToFrequency(UINT nCutOff, int flt_modifier=256) const; // [0-255] => [1-10KHz] |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
766 #endif |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
767 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
768 // Static helper functions |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
769 public: |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
770 static DWORD TransposeToFrequency(int transp, int ftune=0); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
771 static int FrequencyToTranspose(DWORD freq); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
772 static void FrequencyToTranspose(MODINSTRUMENT *psmp); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
773 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
774 // System-Dependant functions |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
775 public: |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
776 static MODCOMMAND *AllocatePattern(UINT rows, UINT nchns); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
777 static signed char* AllocateSample(UINT nbytes); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
778 static void FreePattern(LPVOID pat); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
779 static void FreeSample(LPVOID p); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
780 static UINT Normalize24BitBuffer(LPBYTE pbuffer, UINT cbsizebytes, DWORD lmax24, DWORD dwByteInc); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
781 }; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
782 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
783 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
784 // inline DWORD BigEndian(DWORD x) { return ((x & 0xFF) << 24) | ((x & 0xFF00) << 8) | ((x & 0xFF0000) >> 8) | ((x & 0xFF000000) >> 24); } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
785 // inline WORD BigEndianW(WORD x) { return (WORD)(((x >> 8) & 0xFF) | ((x << 8) & 0xFF00)); } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
786 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
787 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
788 ////////////////////////////////////////////////////////// |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
789 // WAVE format information |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
790 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
791 #pragma pack(1) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
792 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
793 // Standard IFF chunks IDs |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
794 #define IFFID_FORM 0x4d524f46 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
795 #define IFFID_RIFF 0x46464952 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
796 #define IFFID_WAVE 0x45564157 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
797 #define IFFID_LIST 0x5453494C |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
798 #define IFFID_INFO 0x4F464E49 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
799 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
800 // IFF Info fields |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
801 #define IFFID_ICOP 0x504F4349 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
802 #define IFFID_IART 0x54524149 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
803 #define IFFID_IPRD 0x44525049 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
804 #define IFFID_INAM 0x4D414E49 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
805 #define IFFID_ICMT 0x544D4349 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
806 #define IFFID_IENG 0x474E4549 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
807 #define IFFID_ISFT 0x54465349 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
808 #define IFFID_ISBJ 0x4A425349 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
809 #define IFFID_IGNR 0x524E4749 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
810 #define IFFID_ICRD 0x44524349 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
811 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
812 // Wave IFF chunks IDs |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
813 #define IFFID_wave 0x65766177 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
814 #define IFFID_fmt 0x20746D66 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
815 #define IFFID_wsmp 0x706D7377 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
816 #define IFFID_pcm 0x206d6370 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
817 #define IFFID_data 0x61746164 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
818 #define IFFID_smpl 0x6C706D73 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
819 #define IFFID_xtra 0x61727478 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
820 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
821 typedef struct WAVEFILEHEADER |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
822 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
823 DWORD id_RIFF; // "RIFF" |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
824 DWORD filesize; // file length-8 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
825 DWORD id_WAVE; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
826 } WAVEFILEHEADER; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
827 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
828 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
829 typedef struct WAVEFORMATHEADER |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
830 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
831 DWORD id_fmt; // "fmt " |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
832 DWORD hdrlen; // 16 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
833 WORD format; // 1 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
834 WORD channels; // 1:mono, 2:stereo |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
835 DWORD freqHz; // sampling freq |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
836 DWORD bytessec; // bytes/sec=freqHz*samplesize |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
837 WORD samplesize; // sizeof(sample) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
838 WORD bitspersample; // bits per sample (8/16) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
839 } WAVEFORMATHEADER; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
840 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
841 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
842 typedef struct WAVEDATAHEADER |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
843 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
844 DWORD id_data; // "data" |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
845 DWORD length; // length of data |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
846 } WAVEDATAHEADER; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
847 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
848 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
849 typedef struct WAVESMPLHEADER |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
850 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
851 // SMPL |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
852 DWORD smpl_id; // "smpl" -> 0x6C706D73 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
853 DWORD smpl_len; // length of smpl: 3Ch (54h with sustain loop) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
854 DWORD dwManufacturer; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
855 DWORD dwProduct; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
856 DWORD dwSamplePeriod; // 1000000000/freqHz |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
857 DWORD dwBaseNote; // 3Ch = C-4 -> 60 + RelativeTone |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
858 DWORD dwPitchFraction; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
859 DWORD dwSMPTEFormat; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
860 DWORD dwSMPTEOffset; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
861 DWORD dwSampleLoops; // number of loops |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
862 DWORD cbSamplerData; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
863 } WAVESMPLHEADER; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
864 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
865 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
866 typedef struct SAMPLELOOPSTRUCT |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
867 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
868 DWORD dwIdentifier; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
869 DWORD dwLoopType; // 0=normal, 1=bidi |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
870 DWORD dwLoopStart; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
871 DWORD dwLoopEnd; // Byte offset ? |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
872 DWORD dwFraction; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
873 DWORD dwPlayCount; // Loop Count, 0=infinite |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
874 } SAMPLELOOPSTRUCT; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
875 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
876 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
877 typedef struct WAVESAMPLERINFO |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
878 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
879 WAVESMPLHEADER wsiHdr; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
880 SAMPLELOOPSTRUCT wsiLoops[2]; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
881 } WAVESAMPLERINFO; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
882 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
883 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
884 typedef struct WAVELISTHEADER |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
885 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
886 DWORD list_id; // "LIST" -> 0x5453494C |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
887 DWORD list_len; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
888 DWORD info; // "INFO" |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
889 } WAVELISTHEADER; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
890 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
891 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
892 typedef struct WAVEEXTRAHEADER |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
893 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
894 DWORD xtra_id; // "xtra" -> 0x61727478 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
895 DWORD xtra_len; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
896 DWORD dwFlags; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
897 WORD wPan; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
898 WORD wVolume; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
899 WORD wGlobalVol; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
900 WORD wReserved; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
901 BYTE nVibType; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
902 BYTE nVibSweep; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
903 BYTE nVibDepth; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
904 BYTE nVibRate; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
905 } WAVEEXTRAHEADER; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
906 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
907 #pragma pack() |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
908 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
909 /////////////////////////////////////////////////////////// |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
910 // Low-level Mixing functions |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
911 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
912 #define MIXBUFFERSIZE 512 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
913 #define MIXING_ATTENUATION 4 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
914 #define MIXING_CLIPMIN (-0x08000000) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
915 #define MIXING_CLIPMAX (0x07FFFFFF) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
916 #define VOLUMERAMPPRECISION 12 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
917 #define FADESONGDELAY 100 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
918 #define EQ_BUFFERSIZE (MIXBUFFERSIZE) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
919 #define AGC_PRECISION 9 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
920 #define AGC_UNITY (1 << AGC_PRECISION) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
921 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
922 // Calling conventions |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
923 #ifdef MSC_VER |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
924 #define MPPASMCALL __cdecl |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
925 #define MPPFASTCALL __fastcall |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
926 #else |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
927 #define MPPASMCALL |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
928 #define MPPFASTCALL |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
929 #endif |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
930 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
931 #define MOD2XMFineTune(k) ((int)( (signed char)((k)<<4) )) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
932 #define XM2MODFineTune(k) ((int)( (k>>4)&0x0f )) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
933 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
934 int _muldiv(long a, long b, long c); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
935 int _muldivr(long a, long b, long c); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
936 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
937 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
938 // Byte swapping functions from the GNU C Library and libsdl |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
939 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
940 /* Swap bytes in 16 bit value. */ |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
941 #ifdef __GNUC__ |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
942 # define bswap_16(x) \ |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
943 (__extension__ \ |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
944 ({ unsigned short int __bsx = (x); \ |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
945 ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); })) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
946 #else |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
947 static __inline unsigned short int |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
948 bswap_16 (unsigned short int __bsx) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
949 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
950 return ((((__bsx) >> 8) & 0xff) | (((__bsx) & 0xff) << 8)); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
951 } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
952 #endif |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
953 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
954 /* Swap bytes in 32 bit value. */ |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
955 #ifdef __GNUC__ |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
956 # define bswap_32(x) \ |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
957 (__extension__ \ |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
958 ({ unsigned int __bsx = (x); \ |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
959 ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | \ |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
960 (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); })) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
961 #else |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
962 static __inline unsigned int |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
963 bswap_32 (unsigned int __bsx) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
964 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
965 return ((((__bsx) & 0xff000000) >> 24) | (((__bsx) & 0x00ff0000) >> 8) | |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
966 (((__bsx) & 0x0000ff00) << 8) | (((__bsx) & 0x000000ff) << 24)); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
967 } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
968 #endif |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
969 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
970 #if (defined ARM) && (defined _WIN32_WCE) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
971 static __inline unsigned short int |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
972 ARM_get16(const void *data) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
973 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
974 unsigned short int s; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
975 memcpy(&s,data,sizeof(s)); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
976 return s; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
977 } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
978 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
979 static __inline unsigned int |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
980 ARM_get32(const void *data) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
981 { |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
982 unsigned int s; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
983 memcpy(&s,data,sizeof(s)); |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
984 return s; |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
985 } |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
986 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
987 #define bswapLE16(X) ARM_get16(&X) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
988 #define bswapLE32(X) ARM_get32(&X) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
989 #define bswapBE16(X) bswap_16(ARM_get16(&X)) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
990 #define bswapBE32(X) bswap_32(ARM_get32(&X)) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
991 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
992 // From libsdl |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
993 #elif WORDS_BIGENDIAN |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
994 #define bswapLE16(X) bswap_16(X) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
995 #define bswapLE32(X) bswap_32(X) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
996 #define bswapBE16(X) (X) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
997 #define bswapBE32(X) (X) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
998 #else |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
999 #define bswapLE16(X) (X) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
1000 #define bswapLE32(X) (X) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
1001 #define bswapBE16(X) bswap_16(X) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
1002 #define bswapBE32(X) bswap_32(X) |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
1003 #endif |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
1004 |
6b5a52635b3b
[svn] - like with so many other things, modplug is now maintained by us.
nenolod
parents:
diff
changeset
|
1005 #endif |