RCPCMPlayer.h 587 B

123456789101112131415161718192021222324252627
  1. //
  2. // RCPCMPlayer.h
  3. // VclustersGemini
  4. //
  5. // Created by APPLE on 2020/5/23.
  6. // Copyright © 2020 APPLE. All rights reserved.
  7. //
  8. #import <Foundation/Foundation.h>
  9. #import <AudioToolbox/AudioToolbox.h>
  10. #define QUEUE_BUFFER_SIZE 4 //队列缓冲个数
  11. //#define AUDIO_BUFFER_SIZE 2048 //数据区大小
  12. #define MAX_BUFFER_SIZE 80000 //
  13. @interface RCPCMPlayer : NSObject
  14. -(BOOL)start;
  15. -(void)play:(NSData *)data;
  16. -(void)stop;
  17. - (id)initWithAudioBufferSize:(NSInteger)audioBufferSize mSampleRate:(NSInteger)mSampleRate mChannelsPerFrame:(NSInteger)mChannelsPerFrame;
  18. @end