Fix compile errors on macOS
This commit is contained in:
parent
eae0e18714
commit
a733bdb4f9
|
@ -10,7 +10,6 @@ use Format;
|
||||||
use PauseStreamError;
|
use PauseStreamError;
|
||||||
use PlayStreamError;
|
use PlayStreamError;
|
||||||
use SupportedFormatsError;
|
use SupportedFormatsError;
|
||||||
use Sample;
|
|
||||||
use SampleFormat;
|
use SampleFormat;
|
||||||
use SampleRate;
|
use SampleRate;
|
||||||
use StreamData;
|
use StreamData;
|
||||||
|
@ -55,7 +54,6 @@ use self::coreaudio::sys::{
|
||||||
kAudioFormatFlagIsFloat,
|
kAudioFormatFlagIsFloat,
|
||||||
kAudioFormatFlagIsPacked,
|
kAudioFormatFlagIsPacked,
|
||||||
kAudioFormatLinearPCM,
|
kAudioFormatLinearPCM,
|
||||||
kAudioHardwareNoError,
|
|
||||||
kAudioObjectPropertyElementMaster,
|
kAudioObjectPropertyElementMaster,
|
||||||
kAudioObjectPropertyScopeOutput,
|
kAudioObjectPropertyScopeOutput,
|
||||||
kAudioOutputUnitProperty_CurrentDevice,
|
kAudioOutputUnitProperty_CurrentDevice,
|
||||||
|
@ -790,7 +788,7 @@ impl EventLoop {
|
||||||
|
|
||||||
if !stream.playing {
|
if !stream.playing {
|
||||||
if let Err(e) = stream.audio_unit.start() {
|
if let Err(e) = stream.audio_unit.start() {
|
||||||
let description = format!("{}", std::error::Error::description(e));
|
let description = format!("{}", std::error::Error::description(&e));
|
||||||
let err = BackendSpecificError { description };
|
let err = BackendSpecificError { description };
|
||||||
return Err(err.into());
|
return Err(err.into());
|
||||||
}
|
}
|
||||||
|
@ -805,7 +803,7 @@ impl EventLoop {
|
||||||
|
|
||||||
if stream.playing {
|
if stream.playing {
|
||||||
if let Err(e) = stream.audio_unit.stop() {
|
if let Err(e) = stream.audio_unit.stop() {
|
||||||
let description = format!("{}", std::error::Error::description(e));
|
let description = format!("{}", std::error::Error::description(&e));
|
||||||
let err = BackendSpecificError { description };
|
let err = BackendSpecificError { description };
|
||||||
return Err(err.into());
|
return Err(err.into());
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue