From f05ba582076360630a72bd7aa9457948e085bab1 Mon Sep 17 00:00:00 2001 From: mitchmindtree Date: Sun, 2 Feb 2020 18:50:12 +0100 Subject: [PATCH] Update emscripten backend for SupportedStreamConfig private fields --- src/host/emscripten/mod.rs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/host/emscripten/mod.rs b/src/host/emscripten/mod.rs index ee97b98..999746c 100644 --- a/src/host/emscripten/mod.rs +++ b/src/host/emscripten/mod.rs @@ -9,8 +9,8 @@ use stdweb::Reference; use crate::{ BuildStreamError, Data, DefaultStreamConfigError, DeviceNameError, DevicesError, - PauseStreamError, PlayStreamError, SampleFormat, StreamError, SupportedStreamConfig, - SupportedStreamConfigRange, SupportedStreamConfigsError, + PauseStreamError, PlayStreamError, SampleFormat, StreamConfig, StreamError, + SupportedStreamConfig, SupportedStreamConfigRange, SupportedStreamConfigsError, }; use traits::{DeviceTrait, HostTrait, StreamTrait}; @@ -154,7 +154,8 @@ impl DeviceTrait for Device { fn build_input_stream_raw( &self, - _config: &SupportedStreamConfig, + _config: &StreamConfig, + _sample_format: SampleFormat, _data_callback: D, _error_callback: E, ) -> Result @@ -167,7 +168,8 @@ impl DeviceTrait for Device { fn build_output_stream_raw( &self, - config: &SupportedStreamConfig, + _config: &StreamConfig, + sample_format: SampleFormat, data_callback: D, error_callback: E, ) -> Result @@ -176,7 +178,7 @@ impl DeviceTrait for Device { E: FnMut(StreamError) + Send + 'static, { assert_eq!( - config.sample_format, + sample_format, SampleFormat::F32, "emscripten backend currently only supports `f32` data", );