-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clarify formats when working with input/output scopes on an AudioUnit's input/output elements. #60
Comments
It's been a really long time since I've used CA, so this is just from what I've been able to gather from the docs. In general AU don't necessarily have one input and output element.
I think Or the |
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 explicit element parameter to all the places where it hasn't been present before (i.e. setting callbacks and input/output stream formats). This relates to the issue RustAudio#60 and PR RustAudio#47.
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 explicit element parameter to all the places where it hasn't been present before (i.e. setting callbacks and input/output stream formats). This relates to the issue RustAudio#60 and PR RustAudio#47.
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 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 RustAudio#60 and PR RustAudio#47.
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 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 RustAudio#60 and PR RustAudio#47.
Each audio unit actually has 4 formats:
#47 is related to this but perhaps not general enough in its approach to solving this.
Perhaps we should change stream_format to always require taking the
Scope
andElement
as arguments? cc @plietarThe text was updated successfully, but these errors were encountered: