ios audio unit remoteIO playback while recording

后端 未结 2 842
眼角桃花
眼角桃花 2020-12-30 16:16

I have been charged to add VOIP into an game (cross-platform, so can\'t use the Apple gamekit to do it).

For 3 or 4 days now, i\'m trying to get my head wrap around

相关标签:
2条回答
  • 2020-12-30 16:40

    You can see this simple example. It describes how to use remote IO unit. After understanding this example, you should watch PJSIP's audio driver. These should help you implementing your own solution. Best of luck.

    0 讨论(0)
  • 2020-12-30 16:41

    I have not used VOIP or kAudioSessionCategory_PlayAndRecord. But if you want to record/transmit voice picked up from the mic and play back incoming data from network packages: Here is a good sample which included both mic and playback. Also if you have not read this doc from Apple, I would strongly recommend this.

    In short: You need to create an AudioUnits instance. In it, configure two callbacks: one for mic and one for playback. The callback mic function will supply you the data that was picked up from the mic. You then can convert and transmit to other devices with whatever chosen network protocol. The playback callback function is where you supply the incoming data from other network devices to play back.

    0 讨论(0)
提交回复
热议问题