aboutsummaryrefslogtreecommitdiff
path: root/audio/softsynth/mt32/Partial.h
diff options
context:
space:
mode:
authorFilippos Karapetis2013-03-02 14:09:39 +0200
committerFilippos Karapetis2013-03-02 14:09:39 +0200
commitf4cc45d367442f850baecd814003ec09790a43b0 (patch)
treebfc904c0e8ced825749fa910696fae1d24fe10ca /audio/softsynth/mt32/Partial.h
parent8884c240fc4683975cd76802b600c019ebcb260c (diff)
downloadscummvm-rg350-f4cc45d367442f850baecd814003ec09790a43b0.tar.gz
scummvm-rg350-f4cc45d367442f850baecd814003ec09790a43b0.tar.bz2
scummvm-rg350-f4cc45d367442f850baecd814003ec09790a43b0.zip
MT32: Sync with the latest changes in munt
The major change is the addition of a refined wave generator based on logarithmic fixed-point computations and LUTs
Diffstat (limited to 'audio/softsynth/mt32/Partial.h')
-rw-r--r--audio/softsynth/mt32/Partial.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/audio/softsynth/mt32/Partial.h b/audio/softsynth/mt32/Partial.h
index 9166bebffd..21b1bfe376 100644
--- a/audio/softsynth/mt32/Partial.h
+++ b/audio/softsynth/mt32/Partial.h
@@ -44,12 +44,7 @@ private:
int structurePosition; // 0 or 1 of a structure pair
StereoVolume stereoVolume;
- // Distance in (possibly fractional) samples from the start of the current pulse
- float wavePos;
-
- float lastFreq;
-
- float myBuffer[MAX_SAMPLES_PER_RUN];
+ Bit16s myBuffer[MAX_SAMPLES_PER_RUN];
// Only used for PCM partials
int pcmNum;
@@ -60,17 +55,16 @@ private:
// Range: 0-255
int pulseWidthVal;
- float pcmPosition;
-
Poly *poly;
LA32Ramp ampRamp;
LA32Ramp cutoffModifierRamp;
- float *mixBuffersRingMix(float *buf1, float *buf2, unsigned long len);
- float *mixBuffersRing(float *buf1, float *buf2, unsigned long len);
+ // TODO: This should be owned by PartialPair
+ LA32PartialPair la32Pair;
- float getPCMSample(unsigned int position);
+ Bit32u getAmpValue();
+ Bit32u getCutoffValue();
public:
const PatchCache *patchCache;
@@ -90,7 +84,6 @@ public:
unsigned long debugGetSampleNum() const;
int getOwnerPart() const;
- int getKey() const;
const Poly *getPoly() const;
bool isActive() const;
void activate(int part);
@@ -111,7 +104,7 @@ public:
bool produceOutput(float *leftBuf, float *rightBuf, unsigned long length);
// This function writes mono sample output to the provided buffer, and returns the number of samples written
- unsigned long generateSamples(float *partialBuf, unsigned long length);
+ unsigned long generateSamples(Bit16s *partialBuf, unsigned long length);
};
}