Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

audio underrun check? #695

Closed
SanZamoyski opened this issue Mar 6, 2024 · 3 comments
Closed

audio underrun check? #695

SanZamoyski opened this issue Mar 6, 2024 · 3 comments

Comments

@SanZamoyski
Copy link

Hi!

I'm working on project with BLE. I have some problems with underrun (sometimes sound gets coppy - i do not know how to explain it better). I'm already on custom board and I't inconvinient to connect to serial, so I try to debug everything via BLE.
Can I ask audio to tell me if underrun occured (i.e. loop was too long)?

Best regards!

@schreibfaul1
Copy link
Owner

This is difficult, there is nothing to recognise empty DMA. If you have a sample rate of 44.1KHz and the DMA memory has a size of 8KBytes then you can bridge 0.05s in the best case (4Bytes per sample * 41KHz results in about 160K samples/s) audio.loop() should therefore be called more than 20 times per second, in practice about 30 ... 100 times per second.

@SanZamoyski
Copy link
Author

I'll try to work with that info.

Thanks!

@SanZamoyski
Copy link
Author

I'm getting about 4k (and 300-400 with web serwer on), so this is not software problem (I believe).
Best regards!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants