libobs: Add sample_rate param to conv_frames_to_time
Prevents from having to query the base audio subsystem for the sample rate each time the function is called
This commit is contained in:
@@ -182,7 +182,7 @@ static inline uint64_t ns_to_audio_frames(size_t sample_rate,
|
||||
{
|
||||
util_uint128_t val;
|
||||
val = util_mul64_64(frames, sample_rate);
|
||||
val = util_div128_32(val, 1000000000ULL);
|
||||
val = util_div128_32(val, 1000000000);
|
||||
return val.low;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user