Add audio::duration::from_seconds
All checks were successful
Run tests / Run tests (push) Successful in 6m43s

This commit is contained in:
Nikita Lisitsa 2026-07-19 13:34:32 +03:00
parent 20c3fca4b4
commit ae2efc94fb

View file

@ -29,6 +29,11 @@ namespace psemek::audio
return duration(frames_tag{}, samples); return duration(frames_tag{}, samples);
} }
static duration from_seconds(float seconds)
{
return from_frames(seconds_to_frames(seconds));
}
duration(float seconds) duration(float seconds)
: frames_{seconds_to_frames(seconds)} : frames_{seconds_to_frames(seconds)}
{} {}