[Do not merge] Partial work on #137. Only struct PaHostApiTypeId ported for now. #149
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.
Did an initial run with bindgen + ported over a small section of the resulting ffi.rs. I.e. only the (Pa)HostApiTypeId enum. Then I fixed breakage such that the
devices.rs
,hosts.rs
andsine.rs
examples seem to work.The existing solution defines a bunch of consts in
ffi.rs
with a wrapping enum intypes.rs
. Running bindgen creates an enum right inffi.rs
, giving us two enums with basically the same members.Since bindgen does the enum stuff, I guess we might as well drop the enum in
types.rs
altogether? Haven't tried doing that to see what breaks yet.Looking at the generated
.rs
, naming and types change a bit. See DeviceInfo struct below. So fixing this issue will break a lot of API. Don't know if RustAudio has a policy on that.