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

Change Element datatype to be u32.

Open dmski opened this issue 6 years ago • 1 comments

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.

dmski avatar May 09 '19 11:05 dmski

What's stopping this one (apart from rebasing probably)?

NickLarsenNZ avatar May 11 '22 18:05 NickLarsenNZ