From d33645ba137fc6566a953190dcf74c3841bc4d5d Mon Sep 17 00:00:00 2001 From: Stepan Moskovchenko Date: Wed, 17 Oct 2007 03:48:24 +0000 Subject: 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 --- apps/plugins/midi/midiutil.h | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) (limited to 'apps/plugins/midi/midiutil.h') 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 @@ mainly because they have to use 44100Hz sample rate */ #define MAX_VOICES 16 #else -#define MAX_VOICES 24 /* Note: 24 midi channels is the minimum general midi - spec implementation */ +#define MAX_VOICES 24 /* Note: 24 midi channels is the minimum general midi spec implementation */ #endif /* CPU_PP */ #else /* Simulator requires 44100Hz, and we can afford to use more voices */ @@ -98,19 +97,6 @@ struct MIDIfile int numPatches; }; -/* -struct SynthObject -{ - struct GWaveform * wf; - unsigned int delta; - unsigned int decay; - unsigned int cp; - unsigned char state, loopState, loopDir; - unsigned char note, vol, ch, isUsed; - int curRate, curOffset, targetOffset; - unsigned int curPoint; -}; -*/ struct SynthObject { @@ -161,6 +147,10 @@ extern int chPan[16]; /* Channel panning */ extern int chPat[16]; /* Channel patch */ extern int chPW[16]; /* Channel pitch wheel, MSB only */ extern int chPBDepth[16]; /* Channel pitch bend depth (Controller 6 */ +extern int chPBNoteOffset[16] IBSS_ATTR; /* Pre-computed whole semitone offset */ +extern int chPBFractBend[16] IBSS_ATTR; /* Fractional bend applied to delta */ + + extern struct GPatch * gusload(char *); extern struct GPatch * patchSet[128]; -- cgit v1.2.3