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

documentation of amplitude.disconnect() method #682

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

documentation of amplitude.disconnect() method #682

wants to merge 1 commit into from

Conversation

Nitesh639
Copy link
Contributor

Documentation of amplitude.disconnect() method with example.

*
* function draw() {
* background(220);
* text('Disconnect:', 20, 20);
Copy link
Contributor

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?

Copy link
Contributor Author

@Nitesh639 Nitesh639 Nov 26, 2022

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();
Copy link
Contributor

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?

Copy link
Contributor Author

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?

@Nitesh639
Copy link
Contributor Author

@davepagurek please check PR #686.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants