coreaudio-rs icon indicating copy to clipboard operation
coreaudio-rs copied to clipboard

Fix input and output scope and element usage.

Open akhudek opened this issue 2 years ago • 0 comments

Getting input from a microphone needs to use the Output scope and Input Element, and sending audio to a speaker needs to use the Input Scope and Output Element. See Figure 1-3 in https://developer.apple.com/library/archive/documentation/MusicAudio/Conceptual/AudioUnitHostingGuide_iOS/AudioUnitHostingFundamentals/AudioUnitHostingFundamentals.html

This PR also removes a bit of redundancy in the code by reusing input and output stream functions in the callback code.

akhudek avatar Aug 29 '23 19:08 akhudek