2014 snapchat source code
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

39 lines
1.1 KiB

  1. //
  2. // SCAudioCaptureSession.h
  3. // Snapchat
  4. //
  5. // Created by Liu Liu on 3/5/15.
  6. // Copyright (c) 2015 Snapchat, Inc. All rights reserved.
  7. //
  8. #import <CoreMedia/CoreMedia.h>
  9. #import <Foundation/Foundation.h>
  10. extern double const kSCAudioCaptureSessionDefaultSampleRate;
  11. typedef void (^audio_capture_session_block)(NSError *error);
  12. @protocol SCAudioCaptureSession;
  13. @protocol SCAudioCaptureSessionDelegate <NSObject>
  14. - (void)audioCaptureSession:(id<SCAudioCaptureSession>)audioCaptureSession
  15. didOutputSampleBuffer:(CMSampleBufferRef)sampleBuffer;
  16. @end
  17. @protocol SCAudioCaptureSession <NSObject>
  18. @property (nonatomic, weak) id<SCAudioCaptureSessionDelegate> delegate;
  19. // Return detail informantions dictionary if error occured, else return nil
  20. - (void)beginAudioRecordingAsynchronouslyWithSampleRate:(double)sampleRate
  21. completionHandler:(audio_capture_session_block)completionHandler;
  22. - (void)disposeAudioRecordingSynchronouslyWithCompletionHandler:(dispatch_block_t)completionHandler;
  23. @end
  24. @interface SCAudioCaptureSession : NSObject <SCAudioCaptureSession>
  25. @end