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

Add more geiger #1

Merged
merged 1 commit into from
Aug 12, 2019
Merged

Conversation

klauspost
Copy link
Contributor

While the current implementation does well for emulating an avant-garde synthesizer theme the package name is a bit misleading. I attempt to fix that.

Other than that, this also adds a baseline to sort of account for the allocations by the application itself.

"Test" added. Confirmed it sorta-kinda works.

While the current implementation does well for emulating an avant-garde synthesizer theme the name does sound a bit misleading.

Other than that, this also adds a baseline to sort of account for the allocations by the application itself.

"Test" added.
rate := float64(diff)/memSampleRate.Seconds() - baseline
// If it becomes too high it becomes inaudible.
// Limit at 3.6 Roentgen.
rate = math.Min(rate, float64(sr)/3.6)
Copy link
Owner

Choose a reason for hiding this comment

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

not great, not terrible

@@ -10,17 +11,22 @@ import (
)

const sr = beep.SampleRate(44100)
const memSampleRate = 100 * time.Millisecond
const memSampleRate = 500 * time.Millisecond
const baseline = 160
Copy link
Owner

Choose a reason for hiding this comment

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

ideally we could measure this empirically somehow, but I suppose this is better than nothing

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, it was a bit "twitchy" with 100... At least now if you make a burst of allocations you will feel the pain for half a second :D

@lukechampine lukechampine merged commit 2821d78 into lukechampine:master Aug 12, 2019
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