@@ -1689,14 +1689,13 @@ fn get_fixed_latency(devid: AudioObjectID, devtype: DeviceType) -> u32 {
1689
1689
} else {
1690
1690
get_stream_latency ( devstreams[ 0 ] . stream )
1691
1691
}
1692
- } ) . map_err ( |e| {
1692
+ } ) . inspect_err ( |e| {
1693
1693
cubeb_log ! (
1694
1694
"Cannot get the stream, or the latency of the first stream on device {} in {:?} scope. Error: {}" ,
1695
1695
devid,
1696
1696
devtype,
1697
1697
e
1698
1698
) ;
1699
- e
1700
1699
} ) . unwrap_or ( 0 ) ; // default stream latency
1701
1700
1702
1701
device_latency + stream_latency
@@ -3620,12 +3619,11 @@ impl<'ctx> CoreStreamData<'ctx> {
3620
3619
StreamParams :: from ( p)
3621
3620
} ;
3622
3621
3623
- self . input_dev_desc = create_stream_description ( & params) . map_err ( |e | {
3622
+ self . input_dev_desc = create_stream_description ( & params) . inspect_err ( |_ | {
3624
3623
cubeb_log ! (
3625
3624
"({:p}) Setting format description for input failed." ,
3626
3625
self . stm_ptr
3627
3626
) ;
3628
- e
3629
3627
} ) ?;
3630
3628
3631
3629
#[ cfg( feature = "audio-dump" ) ]
@@ -3826,12 +3824,11 @@ impl<'ctx> CoreStreamData<'ctx> {
3826
3824
StreamParams :: from ( p)
3827
3825
} ;
3828
3826
3829
- self . output_dev_desc = create_stream_description ( & params) . map_err ( |e | {
3827
+ self . output_dev_desc = create_stream_description ( & params) . inspect_err ( |_ | {
3830
3828
cubeb_log ! (
3831
3829
"({:p}) Could not initialize the audio stream description." ,
3832
3830
self . stm_ptr
3833
3831
) ;
3834
- e
3835
3832
} ) ?;
3836
3833
3837
3834
#[ cfg( feature = "audio-dump" ) ]
@@ -3856,12 +3853,11 @@ impl<'ctx> CoreStreamData<'ctx> {
3856
3853
3857
3854
let device_layout = self
3858
3855
. get_output_channel_layout ( )
3859
- . map_err ( |e | {
3856
+ . inspect_err ( |_ | {
3860
3857
cubeb_log ! (
3861
3858
"({:p}) Could not get any channel layout. Defaulting to no channels." ,
3862
3859
self . stm_ptr
3863
3860
) ;
3864
- e
3865
3861
} )
3866
3862
. unwrap_or_default ( ) ;
3867
3863
@@ -4739,9 +4735,8 @@ impl<'ctx> AudioUnitStream<'ctx> {
4739
4735
4740
4736
self . core_stream_data
4741
4737
. setup ( & mut self . context . shared_voice_processing_unit )
4742
- . map_err ( |e | {
4738
+ . inspect_err ( |_ | {
4743
4739
cubeb_log ! ( "({:p}) Setup failed." , self . core_stream_data. stm_ptr) ;
4744
- e
4745
4740
} ) ?;
4746
4741
4747
4742
if let Ok ( volume) = vol_rv {
@@ -4750,12 +4745,11 @@ impl<'ctx> AudioUnitStream<'ctx> {
4750
4745
4751
4746
// If the stream was running, start it again.
4752
4747
if !self . stopped . load ( Ordering :: SeqCst ) {
4753
- self . core_stream_data . start_audiounits ( ) . map_err ( |e | {
4748
+ self . core_stream_data . start_audiounits ( ) . inspect_err ( |_ | {
4754
4749
cubeb_log ! (
4755
4750
"({:p}) Start audiounit failed." ,
4756
4751
self . core_stream_data. stm_ptr
4757
4752
) ;
4758
- e
4759
4753
} ) ?;
4760
4754
}
4761
4755
0 commit comments