public interface CHHapticAdvancedPatternPlayer extends CHHapticPatternPlayer
A protocol which defines operations for pausing, resuming, seeking, and sending parameters to a pattern player.
Instances of these objects are created via the factory methods such as `CHHapticEngine(createAdvancedPlayerWithPattern:error)`.
| Modifier and Type | Interface and Description |
|---|---|
static interface |
CHHapticAdvancedPatternPlayer.Block_completionHandler_ret |
static interface |
CHHapticAdvancedPatternPlayer.Block_setCompletionHandler |
| Modifier and Type | Method and Description |
|---|---|
CHHapticAdvancedPatternPlayer.Block_completionHandler_ret |
completionHandler()
[@property] completionHandler
|
boolean |
isMuted()
[@property] isMuted
|
boolean |
loopEnabled()
[@property] loopEnabled
|
double |
loopEnd()
[@property] loopEnd
|
boolean |
pauseAtTimeError(double time,
org.moe.natj.general.ptr.Ptr<NSError> outError)
pauseAtTime:error
|
float |
playbackRate()
[@property] playbackRate
|
boolean |
resumeAtTimeError(double time,
org.moe.natj.general.ptr.Ptr<NSError> outError)
resumeAtTime:error
|
boolean |
seekToOffsetError(double offsetTime,
org.moe.natj.general.ptr.Ptr<NSError> outError)
seekToOffset:error
|
void |
setCompletionHandler(CHHapticAdvancedPatternPlayer.Block_setCompletionHandler value)
[@property] completionHandler
|
void |
setIsMuted(boolean value)
[@property] isMuted
|
void |
setLoopEnabled(boolean value)
[@property] loopEnabled
|
void |
setLoopEnd(double value)
[@property] loopEnd
|
void |
setPlaybackRate(float value)
[@property] playbackRate
|
cancelAndReturnError, scheduleParameterCurveAtTimeError, sendParametersAtTimeError, startAtTimeError, stopAtTimeErrorCHHapticAdvancedPatternPlayer.Block_completionHandler_ret completionHandler()
The block or enclosure that will be called when the player finishes.
boolean isMuted()
When set to YES, all audio and haptic output will be silenced.
isMuted in interface CHHapticPatternPlayerboolean loopEnabled()
When set to YES, the player will loop back to the beginning of the pattern whenever playback reaches the `loopEnd` time.
double loopEnd()
The time in seconds at which the pattern will loop back if looping is enabled.
If set to 0.0, the loop length will be set to the end of the last event in the pattern.
boolean pauseAtTimeError(double time,
org.moe.natj.general.ptr.Ptr<NSError> outError)
Pause playback of the pattern at the specified time (see `CHHapticEngine(currentTime)`).
If 'time' is set to `CHHapticTimeImmediate`, the pattern will be paused immediately.
float playbackRate()
Allows a pattern to be played back at any multiple of its normal rate. The rate can be adjusted at any point before or during pattern playback.
This rate factor scales the relative times of all events and parameters as they are played, as well as the durations of Continuous events. It does not affect the pitches of the events. Any value greater than 0.0 is valid; all others are ignored.
boolean resumeAtTimeError(double time,
org.moe.natj.general.ptr.Ptr<NSError> outError)
Resume playback on a previously-paused player at the specified time (see `CHHapticEngine(currentTime)`).
If 'time' is set to `CHHapticTimeImmediate`, the pattern is resumed as soon as possible. Playback will resume at the time offset in the pattern at which it was paused.
boolean seekToOffsetError(double offsetTime,
org.moe.natj.general.ptr.Ptr<NSError> outError)
Set the playback position on an active player to the specified offset time.
If 'offsetTime' is set to 0.0, the pattern will start from the beginning. If set to >= the duration of the pattern, playback will terminate as soon as possible unless the player is looped, in which case playback will start at the beginning of the loop.
void setCompletionHandler(CHHapticAdvancedPatternPlayer.Block_setCompletionHandler value)
The block or enclosure that will be called when the player finishes.
void setIsMuted(boolean value)
When set to YES, all audio and haptic output will be silenced.
setIsMuted in interface CHHapticPatternPlayervoid setLoopEnabled(boolean value)
When set to YES, the player will loop back to the beginning of the pattern whenever playback reaches the `loopEnd` time.
void setLoopEnd(double value)
The time in seconds at which the pattern will loop back if looping is enabled.
If set to 0.0, the loop length will be set to the end of the last event in the pattern.
void setPlaybackRate(float value)
Allows a pattern to be played back at any multiple of its normal rate. The rate can be adjusted at any point before or during pattern playback.
This rate factor scales the relative times of all events and parameters as they are played, as well as the durations of Continuous events. It does not affect the pitches of the events. Any value greater than 0.0 is valid; all others are ignored.