간단히 요약하면 : RemoteIO를 사용하여 앱에서 생성 한 모든 오디오를 캡처/조작하는 방법이 있습니까?RemoteIO : 앱에서 생성 한 오디오 효과
입력 범위에 대해 RemoteIO의 출력 버스에 연결하여 오디오를 스피커로 보낼 수있는 렌더링 콜백을 얻을 수 있습니다. 하지만 그 콜백의 입력 버퍼에는 AVPlayer에 의해 앱의 다른 곳에서 생성되는 사운드가 포함되어 있지 않습니다. 가능한 모든 앱 오디오를 조작하고 있습니까?
여기 내 설정이다 :
-(void)setup
{
OSStatus status = noErr;
AudioComponentDescription remoteIODesc;
fillRemoteIODesc(&remoteIODesc);
AudioComponent inputComponent = AudioComponentFindNext(NULL, &remoteIODesc);
AudioComponentInstance remoteIO;
status = AudioComponentInstanceNew(inputComponent, &remoteIO);
assert(status == noErr);
AudioStreamBasicDescription desc = {0};
fillShortMonoASBD(&desc);
status = AudioUnitSetProperty(remoteIO,
kAudioUnitProperty_StreamFormat,
kAudioUnitScope_Input,
0,
&desc,
sizeof(desc));
assert(status == noErr);
AURenderCallbackStruct callback;
callback.inputProc = outputCallback;
callback.inputProcRefCon = _state;
status = AudioUnitSetProperty(remoteIO,
kAudioUnitProperty_SetRenderCallback,
kAudioUnitScope_Input,
0,
&callback,
sizeof(callback));
assert(status == noErr);
status = AudioUnitInitialize(remoteIO);
assert(status == noErr);
status = AudioOutputUnitStart(remoteIO);
assert(status == noErr);
}