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:
jp9000
2015-12-20 01:33:12 -08:00
parent 96d9bf794c
commit 8f7d8d05b2
2 changed files with 6 additions and 8 deletions

View File

@@ -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;
}