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 duration parameter to Speaker.play(tone) method #38

Open
tomaszrykala opened this issue Jan 28, 2017 · 0 comments
Open

Add duration parameter to Speaker.play(tone) method #38

tomaszrykala opened this issue Jan 28, 2017 · 0 comments
Assignees

Comments

@tomaszrykala
Copy link
Contributor

The readme for PWM Speaker used to describe an overloaded play() method that takes a tone and a duration as arguments. The driver however, supplies only a method that allows the tone.

readme source:
https://github.com/androidthings/contrib-drivers/tree/master/pwmspeaker

extract:

// Make it play:

try {
    mSpeaker.play(440 /* tone */, 3000L /* duration */);
} catch (IOException e) {
    // error setting speaker
}

The only currently existing method:

    public void play(double frequency) throws IOException, IllegalStateException {
...
    }

For the time being the documentation has removed description of the duration parameter, but it has been requested for implementation by @mangini

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

No branches or pull requests

3 participants