Rely on float->int conversion instead of std::floor in audio resampler hot loop
This commit is contained in:
parent
80b4cc938d
commit
9b3f2df2a0
1 changed files with 1 additions and 1 deletions
|
|
@ -79,7 +79,7 @@ namespace psemek::audio
|
|||
void resampler::advance(float delta)
|
||||
{
|
||||
position_frac_ += delta;
|
||||
auto floor = static_cast<int>(std::floor(position_frac_));
|
||||
auto floor = static_cast<int>(position_frac_);
|
||||
position_ += floor;
|
||||
position_frac_ -= floor;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue