summaryrefslogtreecommitdiff
path: root/apps/plugins/midi/midiutil.h
diff options
context:
space:
mode:
authorStepan Moskovchenko <stevenm@rockbox.org>2007-10-17 03:48:24 +0000
committerStepan Moskovchenko <stevenm@rockbox.org>2007-10-17 03:48:24 +0000
commitd33645ba137fc6566a953190dcf74c3841bc4d5d (patch)
treed35d56499d6e0331376055be863df3ce23d96370 /apps/plugins/midi/midiutil.h
parent1cc852c34655cd69cfc2d2fa42f31576121f86ed (diff)
downloadrockbox-d33645ba137fc6566a953190dcf74c3841bc4d5d.tar.gz
rockbox-d33645ba137fc6566a953190dcf74c3841bc4d5d.zip
MIDI: Optimize the new pitch bending code for a small speedup.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@15160 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugins/midi/midiutil.h')
-rw-r--r--apps/plugins/midi/midiutil.h20
1 files changed, 5 insertions, 15 deletions
diff --git a/apps/plugins/midi/midiutil.h b/apps/plugins/midi/midiutil.h
index 911774440e..30f0009dc7 100644
--- a/apps/plugins/midi/midiutil.h
+++ b/apps/plugins/midi/midiutil.h
@@ -34,8 +34,7 @@
34 mainly because they have to use 44100Hz sample rate */ 34 mainly because they have to use 44100Hz sample rate */
35#define MAX_VOICES 16 35#define MAX_VOICES 16
36#else 36#else
37#define MAX_VOICES 24 /* Note: 24 midi channels is the minimum general midi 37#define MAX_VOICES 24 /* Note: 24 midi channels is the minimum general midi spec implementation */
38 spec implementation */
39#endif /* CPU_PP */ 38#endif /* CPU_PP */
40 39
41#else /* Simulator requires 44100Hz, and we can afford to use more voices */ 40#else /* Simulator requires 44100Hz, and we can afford to use more voices */
@@ -98,19 +97,6 @@ struct MIDIfile
98 int numPatches; 97 int numPatches;
99}; 98};
100 99
101/*
102struct SynthObject
103{
104 struct GWaveform * wf;
105 unsigned int delta;
106 unsigned int decay;
107 unsigned int cp;
108 unsigned char state, loopState, loopDir;
109 unsigned char note, vol, ch, isUsed;
110 int curRate, curOffset, targetOffset;
111 unsigned int curPoint;
112};
113*/
114 100
115struct SynthObject 101struct SynthObject
116{ 102{
@@ -161,6 +147,10 @@ extern int chPan[16]; /* Channel panning */
161extern int chPat[16]; /* Channel patch */ 147extern int chPat[16]; /* Channel patch */
162extern int chPW[16]; /* Channel pitch wheel, MSB only */ 148extern int chPW[16]; /* Channel pitch wheel, MSB only */
163extern int chPBDepth[16]; /* Channel pitch bend depth (Controller 6 */ 149extern int chPBDepth[16]; /* Channel pitch bend depth (Controller 6 */
150extern int chPBNoteOffset[16] IBSS_ATTR; /* Pre-computed whole semitone offset */
151extern int chPBFractBend[16] IBSS_ATTR; /* Fractional bend applied to delta */
152
153
164 154
165extern struct GPatch * gusload(char *); 155extern struct GPatch * gusload(char *);
166extern struct GPatch * patchSet[128]; 156extern struct GPatch * patchSet[128];