aboutsummaryrefslogtreecommitdiff
path: root/backends/midi/mt32/partial.h
diff options
context:
space:
mode:
authorJerome Fisher2004-11-14 04:13:15 +0000
committerJerome Fisher2004-11-14 04:13:15 +0000
commit1aeca6838b1ba5405674d0f5e38174fe6dedd138 (patch)
tree29452d977920959157474f6902c12d456b96c83a /backends/midi/mt32/partial.h
parent5e442766e533339c1e2f3389a2859601c6ab1127 (diff)
downloadscummvm-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/partial.h')
-rw-r--r--backends/midi/mt32/partial.h16
1 files changed, 13 insertions, 3 deletions
diff --git a/backends/midi/mt32/partial.h b/backends/midi/mt32/partial.h
index 20160dca5f..ad7cd65b0b 100644
--- a/backends/midi/mt32/partial.h
+++ b/backends/midi/mt32/partial.h
@@ -24,6 +24,14 @@
namespace MT32Emu {
+class Synth;
+
+enum EnvelopeType {
+ EnvelopeType_amp = 0,
+ EnvelopeType_filt = 1,
+ EnvelopeType_pitch = 2
+};
+
struct envstatus {
Bit32s envpos;
Bit32s envstat;
@@ -39,8 +47,6 @@ struct envstatus {
Bit32s count;
};
-class Synth;
-
// Class definition of MT-32 partials. 32 in all.
class Partial {
private:
@@ -80,6 +86,8 @@ private:
dpoly *poly;
+ int bendShift;
+
Bit16s *mixBuffers(Bit16s * buf1, Bit16s * buf2, int len);
Bit16s *mixBuffersRingMix(Bit16s * buf1, Bit16s * buf2, int len);
Bit16s *mixBuffersRing(Bit16s * buf1, Bit16s * buf2, int len);
@@ -100,14 +108,16 @@ public:
Bit64s age;
Partial(Synth *synth);
+ ~Partial();
int getOwnerPart();
bool isActive();
void activate(int part);
void deactivate(void);
void startPartial(dpoly *usePoly, PatchCache *useCache, Partial *pairPartial);
- void startDecay(int envnum, Bit32s startval);
+ void startDecay(EnvelopeType envnum, Bit32s startval);
void startDecayAll();
+ void setBend(float factor);
bool shouldReverb();
// Returns true only if data written to buffer