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:
| Property |
Type |
Typical value |
Description |
| ch |
int |
2 |
Number of channels, e.g. 2 is stero |
| cn |
int |
0,1,2 |
Audio codecs supported: 0=PCM, 1=ALAC, 2=AAC, 3=AAC ELD |
| sr |
int |
44100 |
Sample rate |
| ss |
int |
16 |
Sample size in bits |
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?
- Read out properties from service config when creating the RAOP client and apply them
- Raise an error in case no supported audio codec is present
- Convert input audio to supported format in case it doesn't match (there's a
convert_frame method in miniadudio for this)
- Update documentation
Is this a breaking change?
No
Anything else worth knowing?
Relates to #1059
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_framemethod in miniadudio for this)Is this a breaking change?
No
Anything else worth knowing?
Relates to #1059