Permalink
Browse files

audio: Removed volume factor adjustment, it's corrupting audio

  • Loading branch information...
fzurita committed Mar 3, 2016
1 parent eb5e176 commit 2aacb16a874e1cd2eed3aa809d0067e19c5c6628
Showing with 1 addition and 2 deletions.
  1. +1 −2 jni/mupen64plus-audio-sles/main.cpp
@@ -956,14 +956,13 @@ void processAudio(const unsigned char* buffer, unsigned int length)
DebugMessage(M64MSG_WARNING, "processAudio(): Audio primary buffer overflow.");
#ifdef FP_ENABLED
static const float volumeFactor = 1.1;
int numSamples = length/sizeof(short);
short* primaryBufferShort = (short*)primaryBuffer;
float primaryBufferFloat[numSamples];
for(int index = 0; index < numSamples; ++index)
{
primaryBufferFloat[index] = volumeFactor*static_cast<float>(primaryBufferShort[index])/32767.0;
primaryBufferFloat[index] = static_cast<float>(primaryBufferShort[index])/32767.0;
}
soundTouch.putSamples((SAMPLETYPE*)primaryBufferFloat, length/N64_SAMPLE_BYTES);

0 comments on commit 2aacb16

Please sign in to comment.