diff --git a/.github/workflows/coreaudio-rs.yml b/.github/workflows/coreaudio-rs.yml index e2fe11cc5..c0ed68b1a 100644 --- a/.github/workflows/coreaudio-rs.yml +++ b/.github/workflows/coreaudio-rs.yml @@ -22,6 +22,14 @@ jobs: # - name: cargo test - all features # run: cargo test --all-features --verbose + security-audit: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: rustsec/audit-check@v1.4.1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + ios-build: runs-on: macOS-latest steps: diff --git a/Cargo.toml b/Cargo.toml index 822ca6ea4..a5bdcde79 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "coreaudio-rs" -version = "0.11.2" +version = "0.11.3" authors = ["mitchmindtree ", "yupferris "] description = "A friendly rust interface for Apple's CoreAudio API." keywords = ["core", "audio", "unit", "osx", "ios"] diff --git a/src/audio_unit/macos_helpers.rs b/src/audio_unit/macos_helpers.rs index bd7c9815a..9e9fc38e6 100644 --- a/src/audio_unit/macos_helpers.rs +++ b/src/audio_unit/macos_helpers.rs @@ -173,6 +173,27 @@ pub fn get_audio_device_ids() -> Result, Error> { get_audio_device_ids_for_scope(Scope::Global) } +#[test] +fn test_get_audio_device_ids() { + let _ = get_audio_device_ids().expect("Failed to get audio device ids"); +} + +#[test] +fn test_get_audio_device_ids_for_scope() { + for scope in &[ + Scope::Global, + Scope::Input, + Scope::Output, + Scope::Group, + Scope::Part, + Scope::Note, + Scope::Layer, + Scope::LayerItem, + ] { + let _ = get_audio_device_ids_for_scope(*scope).expect("Failed to get audio device ids"); + } +} + /// does this device support input / ouptut? pub fn get_audio_device_supports_scope(devid: AudioDeviceID, scope: Scope) -> Result { let dev_scope: AudioObjectPropertyScope = match scope {