Add method to query latency from `Stream`
This is initial work to enable getting the current latency in samples from a Stream. The latency() -> Option<u32> method returns None by default, so this will already compile with all backends. So far, an implementation for coreaudio on MacOS is provided.
Addreses #773.
I think this can be reviewed now - so far it only implements latency() for MacOS Core Audio but should be easy enough to support other backends too.
Could I get some feedback on this? I'm considering pouring some work into cpal (including improvments to the WASAPI backend) but I don't really want to maintain by own fork...
Edit: This was not meant to be offsensive at all, but it would be good to see if there's interest in this!
@marcpabst I got added as maintainer and am doing some backlog grooming. Yes there is interest in this. I'd like to ensure that a sensical number of hosts would be supported coming out of the gates. So beyond CoreAudio also Alsa and WASAPI?