mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2024-12-04 23:45:26 +00: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