Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- _engine = [[AVAudioEngine alloc] init];
- AVAudioMixerNode *resamplerNode = [[AVAudioMixerNode alloc] init];
- [_engine attachNode: resamplerNode];
- [_engine connect:_engine.inputNode to:resamplerNode format:[_engine.inputNode inputFormatForBus:0]];
- [resamplerNode installTapOnBus:0
- bufferSize:512
- format:_inputFormat
- block:^(AVAudioPCMBuffer * _Nonnull buffer, AVAudioTime * _Nonnull when) {
- printf("tap! %lf\n", [_engine.inputNode inputFormatForBus:0].sampleRate);
- }];
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement