BT ring buffering

This commit is contained in:
Sebastien Leclerc
2019-06-06 21:55:22 -04:00
parent d64398fe13
commit 142761eba3
9 changed files with 605 additions and 370 deletions

View File

@@ -615,3 +615,11 @@ uint8_t get_bytes_per_frame(output_format fmt)
assert(bpf>0);
return bpf;
}
/****************************************************************************************
* Wait for a duration based on a frame count
*/
extern struct outputstate output;
void wait_for_frames(size_t frames, uint8_t pct)
{
usleep((1000* frames/output.current_sample_rate*pct/100) );
}