Class SNAudioFileAnalyzer

  • All Implemented Interfaces:
    NSObject

    public class SNAudioFileAnalyzer
    extends NSObject
    Analyzes an audio file and provides analysis results to the client
    • Constructor Detail

      • SNAudioFileAnalyzer

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

      • accessInstanceVariablesDirectly

        public static boolean accessInstanceVariablesDirectly()
      • addRequestWithObserverError

        public boolean addRequestWithObserverError​(SNRequest request,
                                                   SNResultsObserving observer,
                                                   org.moe.natj.general.ptr.Ptr<NSError> error)
        Adds a new analysis request to the analyzer If addRequest is called while the file is being processed, an error will be returned.
        Parameters:
        request - An audio analysis request to be performed on the audio stream
        observer - The object that will receive the analysis results for the supplied request. The observer is weakly retained by the analyzer.
        error - On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.
        Returns:
        YES if the request was successfully added, and NO otherwise.
      • allocWithZone

        public static java.lang.Object allocWithZone​(org.moe.natj.general.ptr.VoidPtr zone)
      • analyze

        public void analyze()
        Analyzes the audio file synchronously This function executes synchronously. Any errors produced during analysis will flow downstream to the request observers. This method may block for a long period of time, so be careful to ensure this call does not block UI or other important tasks.
      • analyzeWithCompletionHandler

        public void analyzeWithCompletionHandler​(SNAudioFileAnalyzer.Block_analyzeWithCompletionHandler completionHandler)
        Analyzes the audio file asynchronously This function executes asynchronously, calling the completion after the entire file has completed analysis. Any errors produced during analysis will flow downstream to the request observers. If the cancelAnalysis method is called, the completionHandler will still be called, but with didReachEndOfFile set to NO.
      • automaticallyNotifiesObserversForKey

        public static boolean automaticallyNotifiesObserversForKey​(java.lang.String key)
      • cancelAnalysis

        public void cancelAnalysis()
        Cancels any in-progress analysis of the audio file This function executes asynchronously, and will trigger the completion handler provided in the analyzeWithCompletionHandler method after the cancellation is complete.
      • cancelPreviousPerformRequestsWithTarget

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

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

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

        public static org.moe.natj.objc.Class classForKeyedUnarchiver()
      • debugDescription_static

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

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

        public static long hash_static()
      • initWithURLError

        public SNAudioFileAnalyzer initWithURLError​(NSURL url,
                                                    org.moe.natj.general.ptr.Ptr<NSError> error)
        Creates a new analyzer
        Parameters:
        url - The url for the audio file to be analyzed
        error - On input, a pointer to an error object. If an error occurs, this pointer is set to an actual error object containing the error information. You may specify nil for this parameter if you do not want the error information.
      • 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

        public static NSSet<java.lang.String> keyPathsForValuesAffectingValueForKey​(java.lang.String key)
      • new_objc

        public static java.lang.Object new_objc()
      • removeAllRequests

        public void removeAllRequests()
        Removes all requests from the analyzer
      • removeRequest

        public void removeRequest​(SNRequest request)
        Removes an existing analysis request from the analyzer Requests can be removed while analysis is in progress. Once the removeRequest method returns, the previously registered observer will not receive any more callbacks.
        Parameters:
        request - An audio analysis request to be removed
      • 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)
      • superclass_static

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

        public static long version_static()