Advertisement
Guest User

Untitled

a guest
Oct 23rd, 2018
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.    _engine = [[AVAudioEngine alloc] init];
  2.     AVAudioMixerNode *resamplerNode = [[AVAudioMixerNode alloc] init];
  3.     [_engine attachNode: resamplerNode];
  4.     [_engine connect:_engine.inputNode to:resamplerNode format:[_engine.inputNode inputFormatForBus:0]];
  5.     [resamplerNode installTapOnBus:0
  6.                         bufferSize:512
  7.                             format:_inputFormat
  8.                              block:^(AVAudioPCMBuffer * _Nonnull buffer, AVAudioTime * _Nonnull when) {
  9.         printf("tap! %lf\n", [_engine.inputNode inputFormatForBus:0].sampleRate);
  10.     }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement