質問

I'd like to capture the audio (music + sound effects) coming from my iPhone game. AVCaptureSession seems to have only the microphone as audio source. I'd like to capture the audio, put it into CMSampleBufferRefs and append these to an AVAssetWriterInput.

I'm currently looking into Audio Queues. Any other ideas?

役に立ちましたか?

解決

There is no API to directly capture all the sound effects and music from your game.

The most common solution is for an app to generate all sound twice, once for audio output, plus a second identical copy in the from of PCM samples to feed a DSP or Audio Unit mixer. Then feed the mixer output to AVAssetWriter or other file output. This technique is much easier to implement if all the sounds produced by your app are in the form of raw PCM audio played via Audio Queue or the RemoteIO Audio Unit API, which may require significant rewrites to your music and game sound code.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top