The output now uses AVSampleBufferAudioRenderer to play all formats, and uses that to resample. It also supports Spatial Audio on macOS 12.0 or newer. Note that there are some outstanding bugs with Spatial Audio support. Namely that it appears to be limited to only 192 kHz at mono or stereo, or 352800 Hz at surround configurations. This breaks DSD64 playback at stereo formats, as well as possibly other things. This is entirely an Apple bug. I have reported it to Apple with reference code FB10441301 for reference, in case anyone else wants to complain that it isn't fixed. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
24 lines
640 B
Objective-C
24 lines
640 B
Objective-C
//
|
|
// Downmix.h
|
|
// Cog
|
|
//
|
|
// Created by Christopher Snowhill on 2/05/22.
|
|
// Copyright 2022 __LoSnoCo__. All rights reserved.
|
|
//
|
|
|
|
#import <CoreAudio/CoreAudio.h>
|
|
#import <Foundation/Foundation.h>
|
|
|
|
@interface DownmixProcessor : NSObject {
|
|
AudioStreamBasicDescription inputFormat;
|
|
AudioStreamBasicDescription outputFormat;
|
|
|
|
uint32_t inConfig;
|
|
uint32_t outConfig;
|
|
}
|
|
|
|
- (id)initWithInputFormat:(AudioStreamBasicDescription)inf inputConfig:(uint32_t)iConfig andOutputFormat:(AudioStreamBasicDescription)outf outputConfig:(uint32_t)oConfig;
|
|
|
|
- (void)process:(const void *)inBuffer frameCount:(size_t)frames output:(void *)outBuffer;
|
|
|
|
@end
|