The API food chain is AVAudioFile -> ExtendedAudioFile -> AudioFile+AudioConverter -> AudioCodec.
So yes, an AudioCodec would be most generally useful and extensible. > On Apr 8, 2020, at 12:07 , Stephen F. Booth via Coreaudio-api > <[email protected]> wrote: > > I'm interested in adding support for additional formats (WavPack, Musepack, > True Audio, etc.) to macOS. My goal is to play these formats using > AVAudioEngine. > > Ideally I'd be able to subclass AVAudioFile and things would just work with > AVAudioEngine but thus far I haven't been successful. I'm not sure if > AVAudioFile is designed to support additional formats through subclassing. > > Years ago Apple released Core Audio utility classes (ACCodec, > AudioFileObject, and friends, still available at > https://developer.apple.com/library/archive/samplecode/CoreAudioUtilityClasses/Introduction/Intro.html#//apple_ref/doc/uid/DTS40012328) > and using those it was possible to create new codecs/AudioFile components > for the system. Apple even released ACFLACCodec as an example. These are no > longer updated and I don't know if third-party audio components are supported > on recent versions of macOS. > > Under the hood as best I can tell AVAudioEngine wraps AUGraph and > AVAudioPlayerNode wraps AUAudioFilePlayer, so I have a hunch that if one > could add a codec it would work across macOS including throughout > AVAudioEngine. > > Is there a way to add additional formats? > > I've considered the following options but I don't know which are realistic: > 1. Subclass AVAudioFile > 2. Create audio codecs/AudioFile components > 3. Wrap the decoder in AVAudioSourceNode > > Of the options, (1) would probably be the easiest to implement if it's > supported, (2) would provide the decoders across the system and avoid > reinventing the wheel, and (3) would probably work but is less desirable. > > Thanks, > Stephen > _______________________________________________ > 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/dwyatt%40apple.com > > This email sent to [email protected] _______________________________________________ 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]
