Add inline to audio::literals
All checks were successful
Run tests / Run tests (push) Successful in 6m50s

This commit is contained in:
Nikita Lisitsa 2026-07-19 03:35:33 +03:00
parent e1dfca7293
commit 20c3fca4b4

View file

@ -8,22 +8,22 @@
namespace psemek::audio::literals
{
duration operator ""_s (unsigned long long value)
inline duration operator ""_s (unsigned long long value)
{
return duration::from_frames(value * frequency);
}
duration operator ""_ms (unsigned long long value)
inline duration operator ""_ms (unsigned long long value)
{
return duration::from_frames((value * frequency) / 1000);
}
duration operator ""_s (long double value)
inline duration operator ""_s (long double value)
{
return duration::from_frames(std::round(value * frequency));
}
duration operator ""_ms (long double value)
inline duration operator ""_ms (long double value)
{
return duration::from_frames(std::round(value * frequency / 1000.0));
}