Add inline to audio::literals
All checks were successful
Run tests / Run tests (push) Successful in 6m50s
All checks were successful
Run tests / Run tests (push) Successful in 6m50s
This commit is contained in:
parent
e1dfca7293
commit
20c3fca4b4
1 changed files with 4 additions and 4 deletions
|
|
@ -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));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue