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

Buffer audio instead of firing an interrupt at 22,050Hz #568

Open
Gadgetoid opened this issue Jan 25, 2021 · 3 comments
Open

Buffer audio instead of firing an interrupt at 22,050Hz #568

Gadgetoid opened this issue Jan 25, 2021 · 3 comments

Comments

@Gadgetoid
Copy link
Contributor

Gadgetoid commented Jan 25, 2021

As brought up by @zenodante in #562 - firing an audio callback at 22kHz will ransack the instruction cache among other things. We should be feeding a ~441 sample buffer at ~50Hz instead.

@Gadgetoid Gadgetoid changed the title Buffer audio instead of firing callback at 22,000Hz Buffer audio instead of firing callback at 22,050Hz Jan 25, 2021
@Gadgetoid Gadgetoid changed the title Buffer audio instead of firing callback at 22,050Hz Buffer audio instead of firing an interrupt at 22,050Hz Jan 25, 2021
@Daft-Freak
Copy link
Collaborator

Checking if the DAC should be enabled every sample probably isn't great either... https://github.com/pimoroni/32blit-beta/blob/master/32blit-stm32/Src/sound.cpp#L22

@Gadgetoid
Copy link
Contributor Author

I did some sleuthing for the old audio code that used DMA and a buffer, and recalled that I never did manage to get it working. The system would just lock up solid and I had to abandon all hope in favour of... this travesty. So... yep. Long overdue a fix.

@zenodante
Copy link
Contributor

I will work on it, after I receive the hardware. Current my h750-dk boards don't have a DAC audio setup. (Q_Q)/

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

3 participants