diff --git a/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/Mixer.cpp b/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/Mixer.cpp index 2226d3f034..1aa29923b8 100644 --- a/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/Mixer.cpp +++ b/Source/Plugins/Plugin_DSP_HLE/Src/PCHW/Mixer.cpp @@ -165,8 +165,14 @@ void Mixer_PushSamples(short *buffer, int num_stereo_samples, int sample_rate) { DataL = t3l; DataR = t3r; } - sample_queue.push(DataL); - sample_queue.push(DataR); + + int l = DataL, r = DataR; + if (l < -32767) l = -32767; + if (r < -32767) r = -32767; + if (l > 32767) l = 32767; + if (r > 32767) r = 32767; + sample_queue.push(l); + sample_queue.push(r); queue_size += 2; } push_sync.Leave(); diff --git a/Source/Plugins/Plugin_DSP_LLE/Src/Mixer.cpp b/Source/Plugins/Plugin_DSP_LLE/Src/Mixer.cpp index 373e0bba16..2c0b8fedad 100644 --- a/Source/Plugins/Plugin_DSP_LLE/Src/Mixer.cpp +++ b/Source/Plugins/Plugin_DSP_LLE/Src/Mixer.cpp @@ -151,9 +151,14 @@ void Mixer_PushSamples(short *buffer, int num_stereo_samples, int sample_rate) { DataL = t3l; DataR = t3r; } - sample_queue.push(DataL); - sample_queue.push(DataR); - queue_size += 2; + + int l = DataL, r = DataR; + if (l < -32767) l = -32767; + if (r < -32767) r = -32767; + if (l > 32767) l = 32767; + if (r > 32767) r = 32767; + sample_queue.push(l); + sample_queue.push(r); } push_sync.Leave(); }