Skip to content

Use Audio Queue record and playback audio file and streams

Notifications You must be signed in to change notification settings

jengeo18/AudioQueueDemo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 

Repository files navigation

AudioQueueDemo

  • 使用AudioQueue录制音频文件
_recorder = [[AQRecorder alloc] initWithFilePath:defaultFilePath];
[_recorder startRecord];

  • 使用AudioQueue录制播放文件
_playAudioQueue = dispatch_queue_create("top.jengeo.app.AudioQueueDemo.AudioPlay", DISPATCH_QUEUE_SERIAL);
_recorder = [[AQRecorder alloc] initWithFilePath:defaultFilePath];
 dispatch_async(_playAudioQueue, ^{
     [self.player startPlay];
 });
  • 使用AudioQueue录制音频流
 _recorder = [[AQRecorder alloc] init];
 _recorder.delegate = self;
 [_recorder startRecord];
  • 使用AudioQueue播放文件
_playAudioQueue = dispatch_queue_create("top.jengeo.app.AudioQueueDemo.AudioPlay", DISPATCH_QUEUE_SERIAL);
_player = [[AQPlayer alloc] init];
_player.delegate = self;
dispatch_async(_playAudioQueue, ^{
   [self.player startPlay];
});

具体可以参考下代码

About

Use Audio Queue record and playback audio file and streams

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published