diff options
author | Jerome Fisher | 2004-11-14 04:13:15 +0000 |
---|---|---|
committer | Jerome Fisher | 2004-11-14 04:13:15 +0000 |
commit | 1aeca6838b1ba5405674d0f5e38174fe6dedd138 (patch) | |
tree | 29452d977920959157474f6902c12d456b96c83a /backends/midi/mt32/part.h | |
parent | 5e442766e533339c1e2f3389a2859601c6ab1127 (diff) | |
download | scummvm-rg350-1aeca6838b1ba5405674d0f5e38174fe6dedd138.tar.gz scummvm-rg350-1aeca6838b1ba5405674d0f5e38174fe6dedd138.tar.bz2 scummvm-rg350-1aeca6838b1ba5405674d0f5e38174fe6dedd138.zip |
MT32 MidiDriver:
- Cleanup
MT32Emu:
- Lots more cleanup.
- Properly implemented pitch bending (not fast, but theoretically perfect).
- Full position delta is now calculated before PCM interpolation/decimation is performed, so that pitch modifiers will be considered.
- Now reports when using SSE or 3DNow, and when the samplerate is invalid.
svn-id: r15801
Diffstat (limited to 'backends/midi/mt32/part.h')
-rw-r--r-- | backends/midi/mt32/part.h | 44 |
1 files changed, 19 insertions, 25 deletions
diff --git a/backends/midi/mt32/part.h b/backends/midi/mt32/part.h index 302ca4d2fb..da73334af1 100644 --- a/backends/midi/mt32/part.h +++ b/backends/midi/mt32/part.h @@ -22,12 +22,6 @@ #ifndef MT32EMU_PART_H #define MT32EMU_PART_H -#define AMPENV 0 -#define FILTENV 1 -#define PITCHENV 2 - -#define MAXPOLY 64 - namespace MT32Emu { class PartialManager; @@ -52,38 +46,38 @@ private: bool holdpedal; - volset volumesetting; + StereoVolume volumesetting; PatchCache patchCache[4]; - Bit32u bend; + float bend; // -1.0 .. +1.0 Bit32s volume; - dpoly polyTable[MAXPOLY]; + dpoly polyTable[MT32EMU_MAX_POLY]; - void AbortPoly(dpoly *poly); + void abortPoly(dpoly *poly); + + static int fixKeyfollow(int srckey, int *dir); + static int fixBiaslevel(int srcpnt, int *dir); public: Part(Synth *synth, int usePartNum); char *getName(); - void PlayNote(PartialManager *partialManager, int f, int vel); - void StopNote(int f); - void AllStop(); - void SetVolume(int vol); - void SetPan(int vol); - void SetBend(int vol); - void SetModulation(int vol); - void SetPatch(int patchnum); - void SetHoldPedal(bool pedalval); - void StopPedalHold(); - void RefreshPatch(); - void RefreshDrumCache(); + void playNote(PartialManager *partialManager, int f, int vel); + void stopNote(int f); + void allStop(); + void setVolume(int vol); + void setPan(int vol); + void setBend(int vol); + void setModulation(int vol); + void setPatch(int patchnum); + void setHoldPedal(bool pedalval); + void stopPedalHold(); + void refreshPatch(); + void refreshDrumCache(); void setPatch(PatchParam *patch); void setTimbre(TimbreParam *timbre); unsigned int getAbsTimbreNum(); - - int FixKeyfollow(int srckey, int *dir); - int FixBiaslevel(int srcpnt, int *dir); }; } |