AudioRecorderManager.h 685 B

12345678910111213141516171819202122232425262728293031323334
  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. @property (nonatomic, copy) NSString *curRecordName;
  15. + (instancetype)sharedManager;
  16. - (void)startRecording;
  17. - (void)stopRecording;
  18. - (void)playRecording;
  19. - (void)stopPlaying;
  20. - (BOOL)isRecording;
  21. - (BOOL)isPlaying;
  22. @end
  23. NS_ASSUME_NONNULL_END