1 public interface Speaker {
4 public boolean startPlayback();
5 public boolean stopPlayback();
6 public boolean getPlaybackState();
7 public boolean setVolume(float _percent);
8 public float getVolume();
9 public int getPosition();
10 public void setPosition(int _mSec);
11 public void loadData(short _samples[], int _offs, int _len);
12 public void clearData();
13 public void registerCallback(SpeakerCallback _cb);
15 capability Initialize {
16 description = "Initialize object";
18 method = "registerCallback(SpeakerCallback _cb)";
22 description = "Manage playback";
23 method = "startPlayback()";
24 method = "stopPlayback()";
25 method = "getPlaybackState()";
29 description = "Manage volume";
30 method = "setVolume(float _percent)";
31 method = "getVolume()";
35 description = "Manage position in the song";
36 method = "getPosition()";
37 method = "setPosition(int _mSec)";
41 description = "Manage song data";
42 method = "loadData(short _samples[], int _offs, int _len)";
43 method = "clearData()";