Package apple.corehaptics.protocol
Interface CHHapticAdvancedPatternPlayer
-
- All Superinterfaces:
CHHapticPatternPlayer
public interface CHHapticAdvancedPatternPlayer extends CHHapticPatternPlayer
[@protocol] CHHapticAdvancedPatternPlayer 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)`.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interfaceCHHapticAdvancedPatternPlayer.Block_completionHandler_retstatic interfaceCHHapticAdvancedPatternPlayer.Block_setCompletionHandler
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description CHHapticAdvancedPatternPlayer.Block_completionHandler_retcompletionHandler()[@property] completionHandler The block or enclosure that will be called when the player finishes.booleanisMuted()[@property] isMuted When set to YES, all audio and haptic output will be silenced.booleanloopEnabled()[@property] loopEnabled When set to YES, the player will loop back to the beginning of the pattern whenever playback reaches the `loopEnd` time.doubleloopEnd()[@property] loopEnd The time in seconds at which the pattern will loop back if looping is enabled.booleanpauseAtTimeError(double time, org.moe.natj.general.ptr.Ptr<NSError> outError)pauseAtTime:error Pause playback of the pattern at the specified time (see `CHHapticEngine(currentTime)`).floatplaybackRate()[@property] playbackRate Allows a pattern to be played back at any multiple of its normal rate.booleanresumeAtTimeError(double time, org.moe.natj.general.ptr.Ptr<NSError> outError)resumeAtTime:error Resume playback on a previously-paused player at the specified time (see `CHHapticEngine(currentTime)`).booleanseekToOffsetError(double offsetTime, org.moe.natj.general.ptr.Ptr<NSError> outError)seekToOffset:error Set the playback position on an active player to the specified offset time.voidsetCompletionHandler(CHHapticAdvancedPatternPlayer.Block_setCompletionHandler value)[@property] completionHandler The block or enclosure that will be called when the player finishes.voidsetIsMuted(boolean value)[@property] isMuted When set to YES, all audio and haptic output will be silenced.voidsetLoopEnabled(boolean value)[@property] loopEnabled When set to YES, the player will loop back to the beginning of the pattern whenever playback reaches the `loopEnd` time.voidsetLoopEnd(double value)[@property] loopEnd The time in seconds at which the pattern will loop back if looping is enabled.voidsetPlaybackRate(float value)[@property] playbackRate Allows a pattern to be played back at any multiple of its normal rate.-
Methods inherited from interface apple.corehaptics.protocol.CHHapticPatternPlayer
cancelAndReturnError, scheduleParameterCurveAtTimeError, sendParametersAtTimeError, startAtTimeError, stopAtTimeError
-
-
-
-
Method Detail
-
completionHandler
CHHapticAdvancedPatternPlayer.Block_completionHandler_ret completionHandler()
[@property] completionHandler The block or enclosure that will be called when the player finishes.
-
isMuted
boolean isMuted()
[@property] isMuted When set to YES, all audio and haptic output will be silenced.- Specified by:
isMutedin interfaceCHHapticPatternPlayer
-
loopEnabled
boolean loopEnabled()
[@property] loopEnabled When set to YES, the player will loop back to the beginning of the pattern whenever playback reaches the `loopEnd` time.
-
loopEnd
double loopEnd()
[@property] 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.
-
pauseAtTimeError
boolean pauseAtTimeError(double time, org.moe.natj.general.ptr.Ptr<NSError> outError)pauseAtTime:error Pause playback of the pattern at the specified time (see `CHHapticEngine(currentTime)`). If 'time' is set to `CHHapticTimeImmediate`, the pattern will be paused immediately.
-
playbackRate
float playbackRate()
[@property] 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.
-
resumeAtTimeError
boolean resumeAtTimeError(double time, org.moe.natj.general.ptr.Ptr<NSError> outError)resumeAtTime:error 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.
-
seekToOffsetError
boolean seekToOffsetError(double offsetTime, org.moe.natj.general.ptr.Ptr<NSError> outError)seekToOffset:error 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.
-
setCompletionHandler
void setCompletionHandler(CHHapticAdvancedPatternPlayer.Block_setCompletionHandler value)
[@property] completionHandler The block or enclosure that will be called when the player finishes.
-
setIsMuted
void setIsMuted(boolean value)
[@property] isMuted When set to YES, all audio and haptic output will be silenced.- Specified by:
setIsMutedin interfaceCHHapticPatternPlayer
-
setLoopEnabled
void setLoopEnabled(boolean value)
[@property] loopEnabled When set to YES, the player will loop back to the beginning of the pattern whenever playback reaches the `loopEnd` time.
-
setLoopEnd
void setLoopEnd(double value)
[@property] 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.
-
setPlaybackRate
void setPlaybackRate(float value)
[@property] 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.
-
-