Add audio::duration::from_seconds
All checks were successful
Run tests / Run tests (push) Successful in 6m43s
All checks were successful
Run tests / Run tests (push) Successful in 6m43s
This commit is contained in:
parent
20c3fca4b4
commit
ae2efc94fb
1 changed files with 5 additions and 0 deletions
|
|
@ -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)}
|
||||||
{}
|
{}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue