diff options
author | Mathieu Arnold <mat@FreeBSD.org> | 2016-07-26 16:51:15 +0000 |
---|---|---|
committer | Mathieu Arnold <mat@FreeBSD.org> | 2016-07-26 16:51:15 +0000 |
commit | 9fa9eb9ac7bf1d3de825ee25a8f0ae81b7b77896 (patch) | |
tree | 9b071a8105704e992946dcd6b801e9fcb7635142 /audio/stymulator/files/patch-stsoundlib_YmMusic.cpp | |
parent | MooseFS is a Fault tolerant, High Available, Highly Performing, Scale-Out, (diff) |
Cleanup patches, a* categories.
Rename them to follow the make makepatch naming, and regenerate them.
With hat: portmgr
Sponsored by: Absolight
Notes
Notes:
svn path=/head/; revision=419133
Diffstat (limited to 'audio/stymulator/files/patch-stsoundlib_YmMusic.cpp')
-rw-r--r-- | audio/stymulator/files/patch-stsoundlib_YmMusic.cpp | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/audio/stymulator/files/patch-stsoundlib_YmMusic.cpp b/audio/stymulator/files/patch-stsoundlib_YmMusic.cpp new file mode 100644 index 000000000000..58f60414c1df --- /dev/null +++ b/audio/stymulator/files/patch-stsoundlib_YmMusic.cpp @@ -0,0 +1,54 @@ +--- stsoundlib/YmMusic.cpp.orig 2016-07-26 16:04:42 UTC ++++ stsoundlib/YmMusic.cpp +@@ -167,12 +167,12 @@ ymbool CYmMusic::isSeekable(void) + return getAttrib()&A_TIMECONTROL; + } + +-void CYmMusic::setLastError(char *pError) ++void CYmMusic::setLastError(const char *pError) + { + pLastError = pError; + } + +-char *CYmMusic::getLastError(void) ++const char *CYmMusic::getLastError(void) + { + return pLastError; + } +@@ -364,11 +364,14 @@ void CYmMusic::player(void) + + if (ptr[12]) + { +- sampleFrq = (MFP_CLOCK / ptr[12]); +- ymChip.drumStart( 2, // Voice C +- sampleAdress[sampleNum], +- sampleLen[sampleNum], +- sampleFrq); ++ if (sampleNum < MAX_DIGIDRUM) ++ { ++ sampleFrq = (MFP_CLOCK / ptr[12]); ++ ymChip.drumStart( 2, // Voice C ++ sampleAdress[sampleNum], ++ sampleLen[sampleNum], ++ sampleFrq); ++ } + } + } + } +@@ -612,7 +615,6 @@ ymTrackerLine_t *pLine; + for (i=0;i<nbVoice;i++) + { + ymint n; +- ymint freq = + pVoice[i].sampleFreq = ((ymint)pLine->freqHigh<<8) | pLine->freqLow; + if (pVoice[i].sampleFreq) + { +@@ -677,7 +679,7 @@ double step; + #ifdef _LINEAR_OVRS + ymint vb = va; + if (samplePos < (sampleEnd-(1<<YMTPREC))) +- ymint vb = pVolumeTab[pSample[(samplePos>>YMTPREC)+1]]; ++ vb = pVolumeTab[pSample[(samplePos>>YMTPREC)+1]]; + ymint frac = samplePos & ((1<<YMTPREC)-1); + va += (((vb-va)*frac)>>YMTPREC); + #endif |