-
-
Notifications
You must be signed in to change notification settings - Fork 682
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
documentation of amplitude.disconnect() method #682
base: main
Are you sure you want to change the base?
Conversation
* | ||
* function draw() { | ||
* background(220); | ||
* text('Disconnect:', 20, 20); |
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.
Maybe we can make the text "Click to disconnect" so it's clearer you can click anywhere?
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.
Ok, I do it.
* function togglePlay() { | ||
* if (sound.isPlaying()){ | ||
* sound.pause(); | ||
* amplitude.disconnect(); |
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.
I think calling disconnect
here might not be the best illustration of what's going on since disconnect
only disconnects the amplitude's outputs. If we don't call sound.pause()
on the line above, nothing appears to happen. Is there an example we can make where we connect the amplitude's output to something else, so that we can disconnect the amplitude's output from that rather than pausing its input?
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.
Should we make a separate button for the disconnect method?
@davepagurek please check PR #686. |
Documentation of amplitude.disconnect() method with example.