mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-31 06:38:22 +00:00
Piano: Remove redundant logic in fill_audio_buffer
"If 0, set to val" is the same as "add val".
This commit is contained in:
parent
c96c33624d
commit
165765145c
Notes:
sideshowbarker
2024-07-19 10:45:10 +09:00
Author: https://github.com/willmcpherson2
Commit: 165765145c
Pull-request: https://github.com/SerenityOS/serenity/pull/898
1 changed files with 1 additions and 4 deletions
|
@ -78,10 +78,7 @@ void PianoWidget::fill_audio_buffer(uint8_t* stream, int len)
|
|||
val = ((volume * m_power[n]) * w_triangle(n));
|
||||
else if (m_wave_type == WaveType::Noise)
|
||||
val = ((volume * m_power[n]) * w_noise());
|
||||
if (sst[i].left == 0)
|
||||
sst[i].left = val;
|
||||
else
|
||||
sst[i].left += val;
|
||||
sst[i].left += val;
|
||||
}
|
||||
sst[i].right = sst[i].left;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue