mirror of https://github.com/PCSX2/pcsx2.git
spu2x: add comment on the previous fix
Always enabled it for all SDL2 versions. A shift won't kill perf. And no surprise if they backport the behavior on older version.
This commit is contained in:
parent
90c5f0e1ae
commit
5a20d629ab
|
@ -47,15 +47,15 @@ namespace {
|
|||
void callback_fillBuffer(void *userdata, Uint8 *stream, int len) {
|
||||
Uint16 sdl_samples = samples;
|
||||
|
||||
// Length should always be samples in bytes.
|
||||
assert(len / sizeof(StereoOut_SDL) == samples);
|
||||
|
||||
#if SDL_MAJOR_VERSION >= 2
|
||||
memset(stream, 0, len);
|
||||
#if SDL_PATCHLEVEL >= 4
|
||||
// As of SDL 2.0.4 the buffer is too small to contains all samples
|
||||
// len is 2048, samples is 1024 and sizeof(StereoOut_SDL) is 4
|
||||
sdl_samples = len / sizeof(StereoOut_SDL);
|
||||
#endif
|
||||
#endif
|
||||
|
||||
// Length should always be samples in bytes.
|
||||
assert(len / sizeof(StereoOut_SDL) == sdl_samples);
|
||||
|
||||
for(Uint16 i = 0; i < sdl_samples; i += SndOutPacketSize)
|
||||
SndBuffer::ReadSamples(&buffer[i]);
|
||||
|
|
Loading…
Reference in New Issue