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

More Explicit Sound Config #3

Merged
merged 1 commit into from
Mar 27, 2024
Merged

More Explicit Sound Config #3

merged 1 commit into from
Mar 27, 2024

Conversation

aprowe
Copy link
Contributor

@aprowe aprowe commented Mar 27, 2024

Changed I2S Config:
- Mono Speaker
- Auto clear buffer

Cleaned up Sound Example

Changed I2S Config:
    - Mono Speaker
    - Auto clear buffer

Cleaned up Sound Example
@Kezii
Copy link
Owner

Kezii commented Mar 27, 2024

does this fix the glitches in the previous implementation? cool

@@ -92,3 +74,22 @@ fn main() {
terminal.draw();
}
}

fn generate_sine_wave(duration_secs: f32, frequency: f32) -> Vec<u8> {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's still not ideal to have this kind of unbounded dynamic memory allocation

But I'm not familiar with the i2s driver, maybe it can be done in a more streaming way with a smaller, statically allocated buffer?

@Kezii Kezii merged commit 362ad89 into Kezii:master Mar 27, 2024
1 check passed
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

Successfully merging this pull request may close these issues.

2 participants