Increase the resampler buffer size, needed on Shield :(

Reset DSound to 44100.
This commit is contained in:
Henrik Rydgard committed 2015-01-11 18:06:39 +01:00
1 parent e508004a4b
commit 1b926ec59e
5 files changed
+12 -4

No files matched your search

+7 -1
View File
@@ -116,6 +116,8 @@ unsigned int StereoResampler::MixerFifo::Mix(short* samples, unsigned int numSam
m_frac &= 0xffff;
}
int realSamples = currentSample;
// Padding with the last value to reduce clicking
short s[2];
s[0] = m_buffer[(indexR - 1) & INDEX_MASK];
@@ -132,7 +134,11 @@ unsigned int StereoResampler::MixerFifo::Mix(short* samples, unsigned int numSam
// Flush cached variable
Common::AtomicStore(m_indexR, indexR);
return numSamples;
if (realSamples != numSamples * 2) {
ILOG("Underrun! %i / %i", realSamples / 2, numSamples);
}
return realSamples / 2;
}
unsigned int StereoResampler::Mix(short* samples, unsigned int num_samples, bool consider_framelimit, int sample_rate) {
+2 -1
View File
@@ -27,7 +27,8 @@
#include "Common/CommonTypes.h"
// 16 bit Stereo
#define MAX_SAMPLES (1024 * 2) // 64ms
#define MAX_SAMPLES (2*(1024 * 2)) // 2*64ms - had to double it for nVidia Shield which has huge buffers
#define INDEX_MASK (MAX_SAMPLES * 2 - 1)
#define LOW_WATERMARK 1280 // 40 ms
+1 -1
View File
@@ -569,7 +569,7 @@ void NativeInitGraphics() {
glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
#ifdef _WIN32
DSound_StartSound(MainWindow::GetHWND(), &Win32Mix, 48000);
DSound_StartSound(MainWindow::GetHWND(), &Win32Mix, 44100);
#endif
}
+1
View File
@@ -187,6 +187,7 @@ EXEC_AND_LIB_FILES := \
$(SRC)/Core/HW/MpegDemux.cpp.arm \
$(SRC)/Core/HW/MediaEngine.cpp.arm \
$(SRC)/Core/HW/SasAudio.cpp.arm \
$(SRC)/Core/HW/StereoResampler.cpp.arm \
$(SRC)/Core/Core.cpp \
$(SRC)/Core/Config.cpp \
$(SRC)/Core/CoreTiming.cpp \
+1 -1
Submodule native updated: 1b5bf730ca...84ed01df53.