CWAudioPlayer.h 692 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. //
  2. // CWAudioPlayer.h
  3. // CWAudioTool
  4. //
  5. // Created by chavez on 2017/9/26.
  6. // Copyright © 2017年 chavez. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <AVFoundation/AVFoundation.h>
  10. #import "CWSington.h"
  11. @interface CWAudioPlayer : NSObject
  12. /**
  13. * 单例
  14. */
  15. singtonInterface;
  16. /**
  17. 播放音频
  18. @param audioPath 音频的本地路径
  19. @return 音频播放器
  20. */
  21. - (AVAudioPlayer *)playAudioWith:(NSString *)audioPath;
  22. /**
  23. 恢复播放音频
  24. */
  25. - (void)resumeCurrentAudio;
  26. /**
  27. 暂停播放
  28. */
  29. - (void)pauseCurrentAudio;
  30. /**
  31. 停止播放
  32. */
  33. - (void)stopCurrentAudio;
  34. /**
  35. 播放进度
  36. */
  37. @property (nonatomic, assign, readonly) float progress;
  38. @end