Fix compilation error when using null host

Also remove other references to EventLoop

Add CI run for wasm32-wasi platform to test null host
This commit is contained in:
Jacob Hughes 2020-08-30 09:57:02 -04:00
parent 65584037fe
commit 5ca70fe6fe
2 changed files with 23 additions and 4 deletions

View File

@ -127,6 +127,25 @@ jobs:
- name: Build beep example - name: Build beep example
run: cargo build --example beep --target ${{ matrix.target }} --features=wasm-bindgen run: cargo build --example beep --target ${{ matrix.target }} --features=wasm-bindgen
wasm32-wasi-test:
strategy:
matrix:
target: [wasm32-wasi]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Install stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
target: ${{ matrix.target }}
- name: Build beep example
run: cargo build --example beep --target ${{ matrix.target }}
windows-test: windows-test:
strategy: strategy:
matrix: matrix:

View File

@ -1,7 +1,7 @@
//! Platform-specific items. //! Platform-specific items.
//! //!
//! This module also contains the implementation of the platform's dynamically dispatched `Host` //! This module also contains the implementation of the platform's dynamically dispatched `Host`
//! type and its associated `EventLoop`, `Device`, `StreamId` and other associated types. These //! type and its associated `Device`, `StreamId` and other associated types. These
//! types are useful in the case that users require switching between audio host APIs at runtime. //! types are useful in the case that users require switching between audio host APIs at runtime.
#[doc(inline)] #[doc(inline)]
@ -27,7 +27,7 @@ pub use self::platform_impl::*;
// } // }
// ``` // ```
// //
// And so on for Device, Devices, EventLoop, Host, StreamId, SupportedInputConfigs, // And so on for Device, Devices, Host, StreamId, SupportedInputConfigs,
// SupportedOutputConfigs and all their necessary trait implementations. // SupportedOutputConfigs and all their necessary trait implementations.
// ``` // ```
macro_rules! impl_platform_host { macro_rules! impl_platform_host {
@ -558,8 +558,8 @@ mod platform_impl {
)))] )))]
mod platform_impl { mod platform_impl {
pub use crate::host::null::{ pub use crate::host::null::{
Device as NullDevice, Devices as NullDevices, EventLoop as NullEventLoop, Host as NullHost, Device as NullDevice, Devices as NullDevices, Host as NullHost,
StreamId as NullStreamId, SupportedInputConfigs as NullSupportedInputConfigs, SupportedInputConfigs as NullSupportedInputConfigs,
SupportedOutputConfigs as NullSupportedOutputConfigs, SupportedOutputConfigs as NullSupportedOutputConfigs,
}; };