Skip to content
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

Add a feature for MacOS' IOKit/audio/IOAudioTypes.h #92

Merged
merged 2 commits into from
Nov 15, 2023

Conversation

Pehrsons
Copy link
Contributor

When querying an AudioStream for its terminal type (kAudioStreamPropertyTerminalType) it will often return a value defined in IOAudioTypes.h (the ranges [INPUT_UNDEFINED, INPUT_MODEM_AUDIO] and [OUTPUT_UNDEFINED, OUTPUT_LOW_FREQUENCY_EFFECTS_SPEAKER]).

This commit adds a feature io_kit_audio that will generate rust bindings for IOAudioTypes.h, so these enum values can be used in rust directly.

When querying an AudioStream for its terminal type
(kAudioStreamPropertyTerminalType) it will often return a value defined
in IOAudioTypes.h (the ranges [INPUT_UNDEFINED, INPUT_MODEM_AUDIO] and
[OUTPUT_UNDEFINED, OUTPUT_LOW_FREQUENCY_EFFECTS_SPEAKER]).

This commit adds a feature io_kit_audio that will generate rust bindings
for IOAudioTypes.h, so these enum values can be used in rust directly.
Copy link
Member

@simlay simlay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really have any complaints about this addition. I think there's an argument for adding iOS support for the IOKit bindings but, eh.

If you want these changes be published to crates.io, bump to version = 0.2.14 in the Cargo.toml.

build.rs Show resolved Hide resolved
@Pehrsons
Copy link
Contributor Author

Thanks! Version bumped.

@Pehrsons
Copy link
Contributor Author

Thanks! Could you merge, please?

@simlay simlay merged commit 412f4f1 into RustAudio:master Nov 15, 2023
10 checks passed
@simlay
Copy link
Member

simlay commented Nov 15, 2023

Thanks! Could you merge, please?

Done, was just waiting for CI to pass and then got distracted.

@simlay
Copy link
Member

simlay commented Nov 15, 2023

0.2.14 is published on crates.io.

@Pehrsons Pehrsons deleted the iokit_audio branch November 15, 2023 19:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants