Class SHSignature

  • All Implemented Interfaces:
    NSCoding, NSCopying, NSSecureCoding, NSObject

    public class SHSignature
    extends NSObject
    implements NSSecureCoding, NSCopying
    The @c SHSignature class is an opaque data container that can be used to store recognition data. Signatures are a compact lossy representation of the original audio. The original audio cannot be recreated from a Signature, there exists only enough data to confirm that the signature matches a certain piece of audio when it is also converted into a Signature. It is similar in utility to a hashing function. Signatures can be matched against any type of audio not just music. The only requirement for a match is that the reference and query Signatures both contain the exact same pre recorded audio e.g. a live rendition of a song will not match against a studio recorded performance of the same piece. There are exceptions to the requirement for exactly matching audio, a signature is robust against slight changes in frequency and speed. [@note] @c SHSignature is not intended to be subclassed API-Since: 15.0
    • Constructor Detail

      • SHSignature

        protected SHSignature​(org.moe.natj.general.Pointer peer)
    • Method Detail

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • allocWithZone

        public static SHSignature allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(@NotNull
                                                                   @NotNull java.lang.String key)
      • cancelPreviousPerformRequestsWithTarget

        public static void cancelPreviousPerformRequestsWithTarget​(@NotNull
                                                                   @NotNull java.lang.Object aTarget)
      • cancelPreviousPerformRequestsWithTargetSelectorObject

        public static void cancelPreviousPerformRequestsWithTargetSelectorObject​(@NotNull
                                                                                 @NotNull java.lang.Object aTarget,
                                                                                 @NotNull
                                                                                 @NotNull org.moe.natj.objc.SEL aSelector,
                                                                                 @Nullable
                                                                                 @Nullable java.lang.Object anArgument)
      • classFallbacksForKeyedArchiver

        @NotNull
        public static @NotNull NSArray<java.lang.String> classFallbacksForKeyedArchiver()
      • classForKeyedUnarchiver

        @NotNull
        public static @NotNull org.moe.natj.objc.Class classForKeyedUnarchiver()
      • copyWithZone

        @NotNull
        public @NotNull java.lang.Object copyWithZone​(@Nullable
                                                      @Nullable org.moe.natj.general.ptr.VoidPtr zone)
        Specified by:
        copyWithZone in interface NSCopying
      • dataRepresentation

        @NotNull
        public @NotNull NSData dataRepresentation()
        The raw data that comprises this signature, this is not audio data
      • debugDescription_static

        public static java.lang.String debugDescription_static()
      • description_static

        public static java.lang.String description_static()
      • duration

        public double duration()
        The duration of the input audio that this signature is derived from The duration may not match the source audio duration exactly, audio that contains portions of silence may report shorter durations
      • hash_static

        public static long hash_static()
      • initWithDataRepresentationError

        public SHSignature initWithDataRepresentationError​(@NotNull
                                                           @NotNull NSData dataRepresentation,
                                                           @Nullable
                                                           @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Create a Signature from Signature data
        Parameters:
        dataRepresentation - Signature data generated by Shazam, this is not raw audio data
        error - Error if the data was invalid
        Returns:
        A signature if the data contained a valid signature, nil otherwise
      • instanceMethodSignatureForSelector

        public static NSMethodSignature instanceMethodSignatureForSelector​(org.moe.natj.objc.SEL aSelector)
      • instancesRespondToSelector

        public static boolean instancesRespondToSelector​(org.moe.natj.objc.SEL aSelector)
      • isSubclassOfClass

        public static boolean isSubclassOfClass​(org.moe.natj.objc.Class aClass)
      • keyPathsForValuesAffectingValueForKey

        @NotNull
        public static @NotNull NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(@NotNull
                                                                                             @NotNull java.lang.String key)
      • resolveClassMethod

        public static boolean resolveClassMethod​(org.moe.natj.objc.SEL sel)
      • resolveInstanceMethod

        public static boolean resolveInstanceMethod​(org.moe.natj.objc.SEL sel)
      • setVersion_static

        public static void setVersion_static​(long aVersion)
      • signatureWithDataRepresentationError

        @Nullable
        public static @Nullable SHSignature signatureWithDataRepresentationError​(@NotNull
                                                                                 @NotNull NSData dataRepresentation,
                                                                                 @Nullable
                                                                                 @Nullable org.moe.natj.general.ptr.Ptr<NSError> error)
        Create a Signature from Signature data
        Parameters:
        dataRepresentation - Signature data generated by Shazam, this is not raw audio data
        error - Error if the data was invalid
        Returns:
        A signature if the data contained a valid signature, nil otherwise
      • superclass_static

        public static org.moe.natj.objc.Class superclass_static()
      • supportsSecureCoding

        public static boolean supportsSecureCoding()
      • _supportsSecureCoding

        public boolean _supportsSecureCoding()
        Description copied from interface: NSSecureCoding
        This property must return YES on all classes that allow secure coding. Subclasses of classes that adopt NSSecureCoding and override initWithCoder: must also override this method and return YES. The Secure Coding Guide should be consulted when writing methods that decode data.
        Specified by:
        _supportsSecureCoding in interface NSSecureCoding
      • version_static

        public static long version_static()
      • useStoredAccessor

        @Deprecated
        public static boolean useStoredAccessor()
        Deprecated.