Change callback interface so that it takes a dedicated error callback
This commit is contained in:
parent
c97d1dd3fa
commit
3cce3e43d9
8 changed files with 50 additions and 71 deletions
|
|
@ -7,7 +7,8 @@ use DeviceNameError;
|
|||
use Format;
|
||||
use PauseStreamError;
|
||||
use PlayStreamError;
|
||||
use StreamDataResult;
|
||||
use StreamData;
|
||||
use StreamError;
|
||||
use SupportedFormatsError;
|
||||
use SupportedFormat;
|
||||
use traits::{DeviceTrait, HostTrait, StreamTrait};
|
||||
|
|
@ -76,14 +77,14 @@ impl DeviceTrait for Device {
|
|||
unimplemented!()
|
||||
}
|
||||
|
||||
fn build_input_stream<F>(&self, format: &Format, callback: F) -> Result<Self::Stream, BuildStreamError>
|
||||
where F: FnMut(StreamDataResult) + Send + 'static {
|
||||
fn build_input_stream<D, E>(&self, format: &Format, data_callback: D, error_callback: E) -> Result<Self::Stream, BuildStreamError>
|
||||
where D: FnMut(StreamData) + Send + 'static, E: FnMut(StreamError) + Send + 'static {
|
||||
unimplemented!()
|
||||
}
|
||||
|
||||
/// Create an output stream.
|
||||
fn build_output_stream<F>(&self, format: &Format, callback: F) -> Result<Self::Stream, BuildStreamError>
|
||||
where F: FnMut(StreamDataResult) + Send + 'static{
|
||||
fn build_output_stream<D, E>(&self, format: &Format, data_callback: D, error_callback: E) -> Result<Self::Stream, BuildStreamError>
|
||||
where D: FnMut(StreamData) + Send + 'static, E: FnMut(StreamError) + Send + 'static{
|
||||
unimplemented!()
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue