I am experimenting with the new AVAudioSinkNode and AVAudioSourceNode nodes, for use with AVAudioEngine.
In terms of setup, my sink node is attached to the input node (e.g. microphone) and my source node is attached to the output node (e.g. speaker). The sink callback is working as expected. Separately, on the source node's side I generated a sine wave signal (inspired by the signal generator code provided by apple)--the source node also appears to be working properly.
I'd like to send the (float) buffers captured at the sink node to the source node, preferably in real time and without saving to a file. This should have the effect of replaying the microphone input to the speaker output. What is the best way to do this?
Essentially I'm looking for a way to connect the sink node to the source node even though I know the nodes might not be meant to be used this way, given that the sink node has no output bus and the source node has no input bus.
I assume I could connect the input node to a mixer connected to the output node in order to channel microphone input directly to the speaker, but for my purposes I would like to use the new sink and source nodes in the configuration as described.
Thanks in advance.
In terms of setup, my sink node is attached to the input node (e.g. microphone) and my source node is attached to the output node (e.g. speaker). The sink callback is working as expected. Separately, on the source node's side I generated a sine wave signal (inspired by the signal generator code provided by apple)--the source node also appears to be working properly.
I'd like to send the (float) buffers captured at the sink node to the source node, preferably in real time and without saving to a file. This should have the effect of replaying the microphone input to the speaker output. What is the best way to do this?
Essentially I'm looking for a way to connect the sink node to the source node even though I know the nodes might not be meant to be used this way, given that the sink node has no output bus and the source node has no input bus.
I assume I could connect the input node to a mixer connected to the output node in order to channel microphone input directly to the speaker, but for my purposes I would like to use the new sink and source nodes in the configuration as described.
Thanks in advance.