A Muse associated with a MuseFileReader This interface may be used to play back packets from a .muse file as MuseDataPackets.
- See also
- ReaderMuseBuilder
-
ReaderMusePlaybackSettings
-
ReaderPlaybackListener
§ asMuse()
abstract Muse com.choosemuse.libmuse.ReaderMuse.asMuse |
( |
| ) |
|
|
abstract |
Downcast to Muse Note that most of the API of the returned Muse is stubbed and will cause assert failures if called in debug mode. The methods that are implemented are:
- isLowEnergy / is_low_energy
- enableDataTransmission / enable_data_transmission
- register*
- unregister*
Note that the only listener that will ever receive packets from a ReaderMuse is MuseDataListener .
§ currentTime()
abstract long com.choosemuse.libmuse.ReaderMuse.currentTime |
( |
| ) |
|
|
abstract |
Corresponds to the timestamp field for the last packet read.
This does not change within a given listener's body.
- Returns
- The timestamp of the last packet read.
§ getPlaybackSettings()
Returns the settings that will be used when playing back a file with this ReaderMuse .
- Returns
- The settings that will be used to play back the file.
§ playback()
abstract void com.choosemuse.libmuse.ReaderMuse.playback |
( |
| ) |
|
|
abstract |
Play back the MuseFile and call each listener for each packet as appropriate.
The speed of the playback is controlled by the playback settings. Simulated playback settings require the ReaderMuse to be constructed with an EventLoop to simulate the time between packets. Calling playback without an EventLoop will not playback the file and will log a warning.
This only works once; the file is not rewound on subsequent calls. If you want to play a file again, create another ReaderMuse
- See also
- ReaderMusePlaybackSettings
§ run()
abstract void com.choosemuse.libmuse.ReaderMuse.run |
( |
| ) |
|
|
abstract |
§ runInRealTimespan()
abstract void com.choosemuse.libmuse.ReaderMuse.runInRealTimespan |
( |
| ) |
|
|
abstract |
§ setPlaybackListener()
Set a listener to receive events related to playback. For example when playback has finished successfully or was interrupted due to error.
- Parameters
-
listener | The playback listener to receive callbacks. |
§ setPlaybackSettings()
Sets the settings to use when playing back a file with this ReaderMuse .
- Parameters
-
settings | The settings to use for playback. |
§ setReaderListener()
abstract void com.choosemuse.libmuse.ReaderMuse.setReaderListener |
( |
ReaderListener |
listener | ) |
|
|
abstract |
Set a listener to receive annotations, version, and configuration packets.
- Parameters
-
listener | The listener for annotation, version and configuration packets. |
The documentation for this class was generated from the following file: