How do I connect an AudioFilePlayer AudioUnit to a 3DMixer?

后端 未结 2 514
逝去的感伤
逝去的感伤 2020-12-31 20:51

I am trying to connect an AudioFilePlayer AudioUnit to an AU3DMixerEmbedded Audio Unit, but I\'m having no success.

Here\'s what I\'m doing:

  1. create

相关标签:
2条回答
  • 2020-12-31 21:21

    (AUGraphConnectNodeInput(_graph, filePlayerNode, 0, mixerNode, 0)) (AUGraphConnectNodeInput(_graph, mixerNode, 0, outputNode, 0))

    Try doing this way if it can help.Just for information the left node is input in the right node. so in first line the player node is input to the mixer node, now mixer node contains both player and mixer so add mixer node to output node.

    0 讨论(0)
  • 2020-12-31 21:22

    I don't see in your code where you set the appropriate kAudioUnitProperty_StreamFormat for the audio units. You will also have to check the error result codes to see if the stream format setting you choose is actually supported by the audio unit being configured. If not, try another format.

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