RustAudio / coreaudio-rs

A friendly rust interface to Apple's Core Audio API.
Apache License 2.0
203 stars 38 forks source link

Fix deprecation warnings #74

Closed MichaelHills closed 3 years ago

MichaelHills commented 3 years ago

Not sure if I'm doing this right. macOS feedback example still runs though.

MichaelHills commented 3 years ago

That’s correct. Hmm is there a less invasive alternative I could have done for the Error description() change to use to_string() instead of changing the implementation of Display? Is it just replacing description with to_string?

simlay commented 3 years ago

That’s correct. Hmm is there a less invasive alternative I could have done for the Error description() change to use to_string() instead of changing the implementation of Display? Is it just replacing description with to_string?

I think this is okay. I'm not entirely sure what the documentation means with to_string (maybe impl String::from) but this seems okay to me.

MichaelHills commented 3 years ago

Did further testing, forcing some errors out, seems like if main() returns Result, it'll log crashes with debug and not display. So I wrapped main to print the display string and it works for a couple of different errors I forced.

Still works on mac feedback + sine and iOS feedback.