Hi I am a contributor to the cmus music player project (https://cmus.github.io/ <https://github.com/cmus/cmus>) who implemented the coreaudio output plugin. My original implementation is based on AudioOutputUnit, which works perfectly fine. Latest code is hosted at https://github.com/Wang-Yue/cmus/blob/master/coreaudio.c.
I'm currently doing an experiment to provide "bit perfect" support (similar what BitPerfect on App Store is doing), that sends the unmodified linear PCM data directly to an output device (such as a DAC), if the device supports such data format. I ran into problem that I cannot change the device stream format from 32 bit float (system default) to 16 bit int (CD format). My hardware does support the 16 bit integer format as an available physical format, and I can set it as kAudioStreamPropertyPhysicalFormat. In Audio Midi Setup I can see it's correctly updated. Then I try to set the kAudioDevicePropertyStreamFormat with 16bit integer AudioStreamBasicDescription. It returns without any error. However, when getting the description from the device again, it seems unchanged (still 32 bit float). My code is listed in https://github.com/Wang-Yue/cmus/blob/exclusive/coreaudio.c#L821 If I force to call AudioDeviceStart, I will get very noisy audio (which is also 2x faster than normal speed). Could someone help and take a look? Thanks Yue
_______________________________________________ Do not post admin requests to the list. They will be ignored. Coreaudio-api mailing list ([email protected]) Help/Unsubscribe/Update your Subscription: https://lists.apple.com/mailman/options/coreaudio-api/archive%40mail-archive.com This email sent to [email protected]
