diff options
author | Chris Robinson <[email protected]> | 2023-12-21 22:09:34 -0800 |
---|---|---|
committer | Chris Robinson <[email protected]> | 2023-12-21 22:09:34 -0800 |
commit | aeb53616757302bd57ce39a13d293db3374276b5 (patch) | |
tree | ea9c084e72ff189639124219fbc7f791f54e2ac6 | |
parent | 863c48a3e78e8a2f1e9217eaf6cda02cbe44e366 (diff) |
Remove an unnecessary std::max
-rw-r--r-- | alc/backends/base.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/alc/backends/base.cpp b/alc/backends/base.cpp index 1677ae19..b287b6d9 100644 --- a/alc/backends/base.cpp +++ b/alc/backends/base.cpp @@ -45,7 +45,7 @@ uint BackendBase::availableSamples() ClockLatency BackendBase::getClockLatency() { - ClockLatency ret; + ClockLatency ret{}; uint refcount; do { @@ -58,8 +58,7 @@ ClockLatency BackendBase::getClockLatency() * any given time during playback. Without a more accurate measurement from * the output, this is an okay approximation. */ - ret.Latency = std::max(std::chrono::seconds{mDevice->BufferSize-mDevice->UpdateSize}, - std::chrono::seconds::zero()); + ret.Latency = std::chrono::seconds{mDevice->BufferSize - mDevice->UpdateSize}; ret.Latency /= mDevice->Frequency; return ret; |