Skip to content

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

Open
@tomaszrykala

Description

@tomaszrykala

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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions