mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-17 16:30:30 +02:00
Revert "Actually use the resample buffer."
This reverts commit dc5d17971c.
This commit is contained in:
1 parent
d6f203db99
commit
97e8f36a9b
1 file changed
+3
-4
@@ -507,12 +507,11 @@ void SasInstance::MixSamples(SasVoice &voice) {
|
||||
if (g_Config.iSFXVolume >= 0 && g_Config.iSFXVolume < MAX_CONFIG_VOLUME)
|
||||
volumeShift += MAX_CONFIG_VOLUME - g_Config.iSFXVolume;
|
||||
|
||||
const int offset = sampleFrac == 0 ? 2 : 1;
|
||||
for (int i = 0; i < grainSize; i++) {
|
||||
const int readIndex = sampleFrac >> PSP_SAS_PITCH_BASE_SHIFT;
|
||||
const int readFrac = sampleFrac & (PSP_SAS_PITCH_BASE - 1);
|
||||
int sample1 = resampleBuffer[readIndex + offset];
|
||||
int sample2 = resampleBuffer[readIndex + 1 + offset];
|
||||
int sample1 = resampleBuffer[readIndex + 2];
|
||||
int sample2 = resampleBuffer[readIndex + 1 + 2];
|
||||
int sample = (sample1 * (PSP_SAS_PITCH_BASE - readFrac) + sample2 * readFrac) / PSP_SAS_PITCH_BASE;
|
||||
sampleFrac += voice.pitch;
|
||||
|
||||
@@ -528,7 +527,7 @@ void SasInstance::MixSamplesHalfPitch(SasVoice &voice) {
|
||||
if (g_Config.iSFXVolume >= 0 && g_Config.iSFXVolume < MAX_CONFIG_VOLUME)
|
||||
volumeShift += MAX_CONFIG_VOLUME - g_Config.iSFXVolume;
|
||||
|
||||
int readIndex2 = voice.sampleFrac == 0 ? 0 : -1;
|
||||
int readIndex2 = voice.sampleFrac == 0 ? 0 : 1;
|
||||
for (int i = 0; i < grainSize; i++) {
|
||||
int sample1 = resampleBuffer[(readIndex2 >> 1) + 2];
|
||||
int sample2 = resampleBuffer[(readIndex2 >> 1) + 1 + 2];
|
||||
|
||||
Reference in new issue
Block a user