diff options
author | Paul Adenot <[email protected]> | 2024-05-23 15:26:56 +0200 |
---|---|---|
committer | Paul Adenot <[email protected]> | 2024-05-24 15:53:45 +0200 |
commit | cb2e32e3e5eee688cbb983b61d8b86bcb8e91a67 (patch) | |
tree | b04b99c1f81d009581271506ed8653ed467015c6 | |
parent | b735de2cee15309ce36359e47fff35c7ab457859 (diff) | |
download | cubeb-cb2e32e3e5eee688cbb983b61d8b86bcb8e91a67.tar.gz cubeb-cb2e32e3e5eee688cbb983b61d8b86bcb8e91a67.zip |
Cast to int64_t to fix the build on 64-bits Android
-rw-r--r-- | src/cubeb_aaudio.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cubeb_aaudio.cpp b/src/cubeb_aaudio.cpp index 915faee..9e81ed3 100644 --- a/src/cubeb_aaudio.cpp +++ b/src/cubeb_aaudio.cpp @@ -647,7 +647,8 @@ aaudio_get_latency(cubeb_stream * stm, aaudio_direction_t direction, // negative. It can happen in some instances, e.g. around start of the stream // that the latency for output is negative, return 0 in this case. int64_t latency_ns = is_output - ? std::max(0ll, app_frame_hw_time - signed_tstamp_ns) + ? std::max(static_cast<int64_t>(0), + app_frame_hw_time - signed_tstamp_ns) : signed_tstamp_ns - app_frame_hw_time; int64_t latency_frames = stm->sample_rate * latency_ns / NS_PER_S; |