LibMuse 6.0.3
com.choosemuse.libmuse.ReaderMuseBuilder Class Referenceabstract

Public Member Functions

abstract ReaderMuseBuilder withPacketTypes (HashSet< MuseDataPacketType > types)
 
abstract ReaderMuseBuilder skipPacketTypes (HashSet< MuseDataPacketType > types)
 
abstract ReaderMuseBuilder withModel (MuseModel model)
 
abstract ReaderMuseBuilder withPlaybackSettings (ReaderMusePlaybackSettings settings)
 
abstract ReaderMuseBuilder withEventLoop (EventLoop loop)
 
abstract ReaderMuse build (MuseFileReader reader)
 
abstract ReaderMuse buildWithAsync (MuseFileReader reader, EventLoop asyncLoop)
 

Static Public Member Functions

static native ReaderMuseBuilder get ()
 

Detailed Description

Builds a ReaderMuse that plays back the packets in the given MuseFileReader .

It exposes a way to set the configuration with chainable method calls, e.g.:

ReaderMuse muse = ReaderMuseBuilder.get()
.withPacketTypes(myPacketTypes)
.build(myMuseFileReader);

Member Function Documentation

§ build()

abstract ReaderMuse com.choosemuse.libmuse.ReaderMuseBuilder.build ( MuseFileReader  reader)
abstract

Construct a ReaderMuse

Parameters
readerThe MuseFileReader to use to read the file.
Returns
A ReaderMuse configured with the parameters that were set.

§ buildWithAsync()

abstract ReaderMuse com.choosemuse.libmuse.ReaderMuseBuilder.buildWithAsync ( MuseFileReader  reader,
EventLoop  asyncLoop 
)
abstract

Construct a ReaderMuse

Parameters
readerThe MuseFileReader to use to read the file.
asyncLoopThe EventLoop to use for the call to Muse::runAsynchronously()
Returns
A ReaderMuse configured with the parameters that were set.
Deprecated:
Set the EventLoop with ReaderMuseBuilder.withEventLoop() and then call ReaderMuseBuilder.build() instead.

§ get()

static native ReaderMuseBuilder com.choosemuse.libmuse.ReaderMuseBuilder.get ( )
static

Returns a reference to a ReaderMuseBuilder

Returns
A reference to a ReaderMuseBuilder

§ skipPacketTypes()

abstract ReaderMuseBuilder com.choosemuse.libmuse.ReaderMuseBuilder.skipPacketTypes ( HashSet< MuseDataPacketType types)
abstract

The set of packet types to explicitly ignore in the file.

The default is the empty set.

The eventual set used is computed by the last call to withPacketTypes() minus the last call to skipPacketTypes()

Parameters
typesThe set of packet types to skip.
Returns
A reference to the same ReaderMuseBuilder

§ withEventLoop()

abstract ReaderMuseBuilder com.choosemuse.libmuse.ReaderMuseBuilder.withEventLoop ( EventLoop  loop)
abstract

The EventLoop to use to handle simulated playback.

The default is a null pointer (no event loop).

Parameters
loopThe EventLoop to use.
Returns
A reference to the same ReaderMuseBuilder

§ withModel()

abstract ReaderMuseBuilder com.choosemuse.libmuse.ReaderMuseBuilder.withModel ( MuseModel  model)
abstract

The model that this Muse should say it is.

The default is Muse 2014 ( MU_01 ).

Parameters
modelThe model to use.
Returns
A reference to the same ReaderMuseBuilder

§ withPacketTypes()

abstract ReaderMuseBuilder com.choosemuse.libmuse.ReaderMuseBuilder.withPacketTypes ( HashSet< MuseDataPacketType types)
abstract

The set of packet types to pass through from the file.

The default set contains the following all packet types in MuseDataPacketType .

The eventual set used is computed by the last call to withPacketTypes() minus the last call to skipPacketTypes()

Parameters
typesThe set of packet types to read.
Returns
A reference to the same ReaderMuseBuilder

§ withPlaybackSettings()

abstract ReaderMuseBuilder com.choosemuse.libmuse.ReaderMuseBuilder.withPlaybackSettings ( ReaderMusePlaybackSettings  settings)
abstract

The playback settings to use with playing back the file.

The default is ReaderMusePlaybackSettings.AS_FAST_AS_POSSIBLE_WITH_SAVED_TIMESTAMP

Parameters
settingsThe playback settings to use.
Returns
A reference to the same ReaderMuseBuilder

The documentation for this class was generated from the following file: