Skip to content

Commit b671130

Browse files
authored
Add sine integration test (#110)
* Move to llvm action rather than homebrew line * Run sine example in ci * Bump version to 0.12.0.
1 parent 23c9754 commit b671130

File tree

3 files changed

+28
-27
lines changed

3 files changed

+28
-27
lines changed

.github/workflows/coreaudio-rs.yml

+26-25
Original file line numberDiff line numberDiff line change
@@ -3,19 +3,23 @@ on: [push, pull_request]
33
jobs:
44
# Run cargo test with default, no and all features.
55
macos-test:
6-
runs-on: macOS-latest
6+
runs-on: ${{ matrix.os }}
7+
strategy:
8+
matrix:
9+
os: [macOS-latest]
710
steps:
811
- uses: actions/checkout@v4
9-
- name: Install llvm and clang
10-
run: brew install llvm
11-
- name: Install stable
12-
uses: actions-rs/toolchain@v1
12+
- name: Install LLVM and Clang
13+
uses: KyleMayes/[email protected]
14+
with:
15+
version: "15.0"
16+
- uses: dtolnay/rust-toolchain@master
1317
with:
14-
profile: minimal
1518
toolchain: stable
16-
override: true
1719
- name: cargo test
1820
run: cargo test --verbose
21+
- name: Run sign example
22+
run: cargo run --example sine
1923
# TODO: These don't work as of 2020-12-06, but they should.
2024
# - name: cargo test - no features
2125
# run: cargo test --no-default-features --verbose
@@ -34,14 +38,13 @@ jobs:
3438
runs-on: macOS-latest
3539
steps:
3640
- uses: actions/checkout@v4
37-
- name: Install llvm and clang
38-
run: brew install llvm
39-
- name: Install stable
40-
uses: actions-rs/toolchain@v1
41+
- name: Install LLVM and Clang
42+
uses: KyleMayes/[email protected]
43+
with:
44+
version: "15.0"
45+
- uses: dtolnay/rust-toolchain@master
4146
with:
42-
profile: minimal
4347
toolchain: stable
44-
override: true
4548
- name: Add iOS targets
4649
run: rustup target add aarch64-apple-ios x86_64-apple-ios
4750
- name: Install cargo lipo
@@ -54,14 +57,13 @@ jobs:
5457
runs-on: macOS-latest
5558
steps:
5659
- uses: actions/checkout@v4
57-
- name: Install llvm and clang
58-
run: brew install llvm
59-
- name: Install stable
60-
uses: actions-rs/toolchain@v1
60+
- name: Install LLVM and Clang
61+
uses: KyleMayes/[email protected]
62+
with:
63+
version: "15.0"
64+
- uses: dtolnay/rust-toolchain@master
6165
with:
62-
profile: minimal
6366
toolchain: stable
64-
override: true
6567
- name: cargo doc - all features
6668
run: cargo doc --all-features --verbose
6769

@@ -74,14 +76,13 @@ jobs:
7476
runs-on: macOS-latest
7577
steps:
7678
- uses: actions/checkout@v4
77-
- name: Install llvm and clang
78-
run: brew install llvm
79-
- name: Install stable
80-
uses: actions-rs/toolchain@v1
79+
- name: Install LLVM and Clang
80+
uses: KyleMayes/[email protected]
81+
with:
82+
version: "15.0"
83+
- uses: dtolnay/rust-toolchain@master
8184
with:
82-
profile: minimal
8385
toolchain: stable
84-
override: true
8586
- name: cargo publish
8687
continue-on-error: true
8788
run: cargo publish --token $CRATESIO_TOKEN

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "coreaudio-rs"
3-
version = "0.11.3"
3+
version = "0.12.0"
44
authors = ["mitchmindtree <[email protected]>", "yupferris <[email protected]>"]
55
description = "A friendly rust interface for Apple's CoreAudio API."
66
keywords = ["core", "audio", "unit", "osx", "ios"]

examples/sine.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ fn main() -> Result<(), coreaudio::Error> {
4444
// Read the input format. This is counterintuitive, but it's the format used when sending
4545
// audio data to the AudioUnit representing the output device. This is separate from the
4646
// format the AudioUnit later uses to send the data to the hardware device.
47-
let stream_format = audio_unit.input_stream_format()?;
47+
let stream_format = audio_unit.output_stream_format()?;
4848
println!("{:#?}", &stream_format);
4949

5050
// For this example, our sine wave expects `f32` data.

0 commit comments

Comments
 (0)