Skip to content

Commit

Permalink
Avoid an unnecessary template parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
kcat committed Dec 26, 2024
1 parent 2a03b0b commit 481ea22
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions alc/backends/wasapi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,7 @@ using unique_coptr = std::unique_ptr<T,CoTaskMemDeleter<T>>;


/* Scales the given reftime value, rounding the result. */
template<typename T>
constexpr uint RefTime2Samples(const ReferenceTime &val, T srate) noexcept
constexpr auto RefTime2Samples(const ReferenceTime &val, DWORD srate) noexcept -> uint
{
const auto retval = (val*srate + ReferenceTime{seconds{1}}/2) / seconds{1};
return static_cast<uint>(std::min<decltype(retval)>(retval, std::numeric_limits<uint>::max()));
Expand Down

0 comments on commit 481ea22

Please sign in to comment.