Closed postlund closed 3 years ago
Interesting observation is that the python miniaudio library automatically decodes any input to 44100/2/16 when loading a file, so that make things kinda just work. What I need to do is to store values from zeroconf and use them as input to decode_file
(i.e. make sure input file is decoded to the format the receiver expects). Later versions of AirPlay (2?) doesn't seem to include these properties in Zeroconf at all. So I assume it's safe to default to 44100/2/16 in these cases. Looks like owntone is doing that.
Short feature/function description I realize that I currently don't deal with audio properties, e.g. sample rate, channel count, correctly. I basically try to output in the same format as the input file, which won't work as the receiver tells us what it supports and we need to match that. It is done via zeroconf properties and I believe the following are of interest:
Currently, only ALAC output is supported (not sure how to format PCM and what to send in ANNOUNCE for it). So maybe give an error if it is not supported by receiver. Would be surprised if not all receivers supports it.
All properties are already present in the service config, so should be pretty easy to do.
What needs to be done?
convert_frame
method in miniadudio for this)Is this a breaking change? No
Anything else worth knowing? Relates to #1059