mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:58:13 +00:00
AK: Make Vector use size_t for its size and capacity
This commit is contained in:
parent
9c6f7d3e7d
commit
ceec1a7d38
94 changed files with 323 additions and 317 deletions
|
@ -226,11 +226,11 @@ Audio::Sample AudioEngine::noise() const
|
|||
Audio::Sample AudioEngine::recorded_sample(size_t note)
|
||||
{
|
||||
int t = m_pos[note];
|
||||
if (t >= m_recorded_sample.size())
|
||||
if (t >= static_cast<int>(m_recorded_sample.size()))
|
||||
return 0;
|
||||
double w_left = m_recorded_sample[t].left;
|
||||
double w_right = m_recorded_sample[t].right;
|
||||
if (t + 1 < m_recorded_sample.size()) {
|
||||
if (t + 1 < static_cast<int>(m_recorded_sample.size())) {
|
||||
double t_fraction = m_pos[note] - t;
|
||||
w_left += (m_recorded_sample[t + 1].left - m_recorded_sample[t].left) * t_fraction;
|
||||
w_right += (m_recorded_sample[t + 1].right - m_recorded_sample[t].right) * t_fraction;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue