mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
Fixed ms_duration function to show actual ms (#1836)
This commit is contained in:
parent
13f12227bd
commit
f59f5dfaa3
@ -111,7 +111,7 @@ inline uint32_t ms_duration(
|
||||
if (sample_rate == 0 || bytes_per_sample == 0)
|
||||
return 0;
|
||||
|
||||
return buffer_size / bytes_per_sample / sample_rate * 1000;
|
||||
return buffer_size * 1000 / (bytes_per_sample * sample_rate);
|
||||
}
|
||||
|
||||
int fast_int_magnitude(int y, int x);
|
||||
|
Loading…
Reference in New Issue
Block a user