Open TDW89 opened 1 year ago
the preferred behaviour would be to change device parameters since it is a supported format.
I agree. I think we'd accept a patch that did that.
Have you looked into the PortAudio code? Do you think this is an omission, an error in the PA code, or perhaps an issue with CoreAudio not actually changing the bit depth as requested?
I wonder whether PortAudio is doing 24 to 16-bit conversion itself, or is PortAudio passing 24-bit audio to CoreAudio and then CoreAudio converts to 16-bit.
Describe the bug
paMacCoreChangeDeviceParameters and paMacCoreFailIfConversionRequired not functioning as expected with regard to stream bit depth.
To Reproduce
Steps to reproduce the behavior.
Expected behavior
The format should change to 24-bit 48kHz
Actual behavior
The format instead only changes sample rate to 16-bit 48kHz, or alternatively fail due to the paMacCoreFailIfConversionRequired flag but the preferred behaviour would be to change device parameters since it is a supported format.
Desktop:
Additional context
We are testing a device that supports both 16-bit and 24-bit PCM streams, at a variety of bit rates, by sending it known values and checking that those values are reaching the DAC. On macOS we have run into an issue where the host is selecting eg. 44.1kHz 16-bit causing a 44.1kHz 24-bit test stream to lose 8 bits of resolution. If the correct bit depth is selected in Audio Midi Settings, then the issue resolves itself but interacting with the gui is less than ideal for remote testing.