mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-09-21 02:08:12 +03:00
ABuffer: clamp -> clip
More natural term when talking about audio :)
This commit is contained in:
parent
ed25d524f2
commit
fd6cafaa84
Notes:
sideshowbarker
2024-07-19 13:13:34 +09:00
Author: https://github.com/rburchell Commit: https://github.com/SerenityOS/serenity/commit/fd6cafaa84d Pull-request: https://github.com/SerenityOS/serenity/pull/322
@ -25,7 +25,7 @@ struct ASample {
|
||||
, right(right)
|
||||
{}
|
||||
|
||||
void clamp()
|
||||
void clip()
|
||||
{
|
||||
if (left > 1)
|
||||
left = 1;
|
||||
|
@ -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<i16>::max();
|
||||
|
Loading…
Reference in New Issue
Block a user