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)`.
    • Method Detail

      • isMuted

        boolean isMuted()
        [@property] isMuted When set to YES, all audio and haptic output will be silenced.
        Specified by:
        isMuted in interface CHHapticPatternPlayer
      • 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.
      • setIsMuted

        void setIsMuted​(boolean value)
        [@property] isMuted When set to YES, all audio and haptic output will be silenced.
        Specified by:
        setIsMuted in interface CHHapticPatternPlayer
      • 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.