You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 #60 and PR #47.
Copy file name to clipboardExpand all lines: src/audio_unit/mod.rs
+15-19Lines changed: 15 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -62,14 +62,9 @@ pub enum Scope {
62
62
LayerItem = 7,
63
63
}
64
64
65
-
/// Represents the **Input** and **Output** **Element**s.
66
-
///
67
-
/// These are used when specifying which **Element** we're setting the properties of.
68
-
#[derive(Copy,Clone,Debug)]
69
-
pubenumElement{
70
-
Output = 0,
71
-
Input = 1,
72
-
}
65
+
/// These are used when specifying which **Element** (bus) we're setting the properties of.
66
+
/// [The anatomy of an AudioUnit](https://developer.apple.com/library/archive/documentation/MusicAudio/Conceptual/AudioUnitProgrammingGuide/TheAudioUnit/TheAudioUnit.html#//apple_ref/doc/uid/TP40003278-CH12-SW11)
67
+
typeElement = u32;
73
68
74
69
75
70
/// A rust representation of the sys::AudioUnit, including a pointer to the current rendering callback.
0 commit comments