Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
As i understand it, an audio unit can have several inputs and several outputs,
and an 'element' is just an index of one of those (https://developer.apple.com/library/archive/documentation/MusicAudio/Conceptual/AudioUnitProgrammingGuide/TheAudioUnit/TheAudioUnit.html).
Therefore, it's should be possible, for example, to have several render callbacks for a single audio unit.
An example would be a crossfade unit with 2 inputs: it'll have 2 elements in its input scope
and 1 in output scope, and it'll require either two render callbacks (one for each input),
or two upstream audio units.
This changes Element to be just a number and adds an explicit element parameter to all the places
where it hasn't been present before (i.e. setting callbacks and input/output stream formats).
I also had to change handling of render callbacks a bit, since there can now be more than one of them for a single audio unit.
This relates to the issue #60 and PR #47.