-
Notifications
You must be signed in to change notification settings - Fork 151
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 sound API: beep #135
base: main
Are you sure you want to change the base?
Add sound API: beep #135
Conversation
@inexorabletash is it acceptable right now? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry about the delay, life got really busy for a week there.
oscillator.start(); | ||
setTimeout( | ||
function() { | ||
oscillator.stop(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Will the oscillator leak here since it's not detached? Or is "ended" guaranteed to fire?
// | ||
// Sound API | ||
// | ||
this.assert_equals('beep 220 1', undefined); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for adding tests!
Can you add documentation as well, in language.html?
add basic sound support to jslogo. In this first commit, only "beep" was supported.
beep
frequency is in Hertz, and duration is in millisecond.
examples: