Update emscripten backend for SupportedStreamConfig private fields
This commit is contained in:
parent
476f6c4c2c
commit
f05ba58207
|
@ -9,8 +9,8 @@ use stdweb::Reference;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
BuildStreamError, Data, DefaultStreamConfigError, DeviceNameError, DevicesError,
|
BuildStreamError, Data, DefaultStreamConfigError, DeviceNameError, DevicesError,
|
||||||
PauseStreamError, PlayStreamError, SampleFormat, StreamError, SupportedStreamConfig,
|
PauseStreamError, PlayStreamError, SampleFormat, StreamConfig, StreamError,
|
||||||
SupportedStreamConfigRange, SupportedStreamConfigsError,
|
SupportedStreamConfig, SupportedStreamConfigRange, SupportedStreamConfigsError,
|
||||||
};
|
};
|
||||||
use traits::{DeviceTrait, HostTrait, StreamTrait};
|
use traits::{DeviceTrait, HostTrait, StreamTrait};
|
||||||
|
|
||||||
|
@ -154,7 +154,8 @@ impl DeviceTrait for Device {
|
||||||
|
|
||||||
fn build_input_stream_raw<D, E>(
|
fn build_input_stream_raw<D, E>(
|
||||||
&self,
|
&self,
|
||||||
_config: &SupportedStreamConfig,
|
_config: &StreamConfig,
|
||||||
|
_sample_format: SampleFormat,
|
||||||
_data_callback: D,
|
_data_callback: D,
|
||||||
_error_callback: E,
|
_error_callback: E,
|
||||||
) -> Result<Self::Stream, BuildStreamError>
|
) -> Result<Self::Stream, BuildStreamError>
|
||||||
|
@ -167,7 +168,8 @@ impl DeviceTrait for Device {
|
||||||
|
|
||||||
fn build_output_stream_raw<D, E>(
|
fn build_output_stream_raw<D, E>(
|
||||||
&self,
|
&self,
|
||||||
config: &SupportedStreamConfig,
|
_config: &StreamConfig,
|
||||||
|
sample_format: SampleFormat,
|
||||||
data_callback: D,
|
data_callback: D,
|
||||||
error_callback: E,
|
error_callback: E,
|
||||||
) -> Result<Self::Stream, BuildStreamError>
|
) -> Result<Self::Stream, BuildStreamError>
|
||||||
|
@ -176,7 +178,7 @@ impl DeviceTrait for Device {
|
||||||
E: FnMut(StreamError) + Send + 'static,
|
E: FnMut(StreamError) + Send + 'static,
|
||||||
{
|
{
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
config.sample_format,
|
sample_format,
|
||||||
SampleFormat::F32,
|
SampleFormat::F32,
|
||||||
"emscripten backend currently only supports `f32` data",
|
"emscripten backend currently only supports `f32` data",
|
||||||
);
|
);
|
||||||
|
|
Loading…
Reference in New Issue