QMAudioRecorder.h 779 B

123456789101112131415161718192021222324252627282930313233343536
  1. //
  2. // QMAudioRecorder.h
  3. // IMSDK-OC
  4. //
  5. // Created by haochongfeng on 2017/8/10.
  6. // Copyright © 2017年 HCF. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <AVFoundation/AVFoundation.h>
  10. @protocol QMAudioRecorderDelegate <NSObject>
  11. - (void)audioRecorderStart;
  12. - (void)audioRecorderCompletion:(NSString *)fileName duration:(NSString *)duration;
  13. - (void)audioRecorderCancel;
  14. - (void)audioRecorderFail;
  15. - (void)audioRecorderChangeInTimer:(NSTimeInterval)power total:(int)count;
  16. @end
  17. @interface QMAudioRecorder : NSObject
  18. + (QMAudioRecorder *)sharedInstance;
  19. - (void)startAudioRecord:(NSString *)fileName maxDuration:(NSTimeInterval)duration delegate:(id<QMAudioRecorderDelegate>)delegate;
  20. - (void)stopAudioRecord;
  21. - (void)cancelAudioRecord;
  22. @end