AudioRecorderManager.h 631 B

1234567891011121314151617181920212223242526272829303132
  1. //
  2. // AudioRecorderManager.h
  3. // 双子星云手机
  4. //
  5. // Created by xd h on 2025/3/28.
  6. //
  7. #import <Foundation/Foundation.h>
  8. #import <AVFoundation/AVFoundation.h>
  9. NS_ASSUME_NONNULL_BEGIN
  10. @interface AudioRecorderManager : NSObject<AVAudioRecorderDelegate>
  11. @property (nonatomic, strong) AVAudioRecorder *audioRecorder;
  12. @property (nonatomic, strong) AVAudioPlayer *audioPlayer;
  13. @property (nonatomic, copy) NSString *recordedFilePath;
  14. + (instancetype)sharedManager;
  15. - (void)startRecording;
  16. - (void)stopRecording;
  17. - (void)playRecording;
  18. - (void)stopPlaying;
  19. - (BOOL)isRecording;
  20. - (BOOL)isPlaying;
  21. @end
  22. NS_ASSUME_NONNULL_END