From fd6cafaa84dc31709c3dee17728681dc6539162f Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Wed, 17 Jul 2019 09:43:43 +0200 Subject: [PATCH] ABuffer: clamp -> clip More natural term when talking about audio :) --- Libraries/LibAudio/ABuffer.h | 2 +- Servers/AudioServer/ASMixer.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Libraries/LibAudio/ABuffer.h b/Libraries/LibAudio/ABuffer.h index 53ccbb0694..1bae00e6c2 100644 --- a/Libraries/LibAudio/ABuffer.h +++ b/Libraries/LibAudio/ABuffer.h @@ -25,7 +25,7 @@ struct ASample { , right(right) {} - void clamp() + void clip() { if (left > 1) left = 1; diff --git a/Servers/AudioServer/ASMixer.cpp b/Servers/AudioServer/ASMixer.cpp index 15a00dcb4d..554085c440 100644 --- a/Servers/AudioServer/ASMixer.cpp +++ b/Servers/AudioServer/ASMixer.cpp @@ -90,7 +90,7 @@ void ASMixer::mix() for (int i = 0; i < mixed_buffer.size(); ++i) { auto& mixed_sample = mixed_buffer[i]; - mixed_sample.clamp(); + mixed_sample.clip(); i16 out_sample; out_sample = mixed_sample.left * std::numeric_limits::max();