Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77973c43 authored by Glenn Kasten's avatar Glenn Kasten
Browse files

Pull out commonly used constants to <audio_utils/clock.h>

Test: builds OK
Change-Id: I7d2c4cb8982a3d792edf8fad7a7bae0ac3c4331c
parent d24be7ca
Loading
Loading
Loading
Loading
+0 −2
Original line number Diff line number Diff line
@@ -55,8 +55,6 @@ static inline const T &max(const T &x, const T &y) {
    return x > y ? x : y;
}

static const int32_t NANOS_PER_SECOND = 1000000000;

static inline nsecs_t framesToNanoseconds(ssize_t frames, uint32_t sampleRate, float speed)
{
    return ((double)frames * 1000000000) / ((double)sampleRate * speed);