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>
73 lines
1.4 KiB
Objective-C
73 lines
1.4 KiB
Objective-C
//
|
|
// OutputNode.h
|
|
// Cog
|
|
//
|
|
// Created by Vincent Spader on 8/2/05.
|
|
// Copyright 2005 Vincent Spader. All rights reserved.
|
|
//
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
#import <AudioToolbox/AudioToolbox.h>
|
|
#import <AudioUnit/AudioUnit.h>
|
|
#import <CoreAudio/AudioHardware.h>
|
|
|
|
#import "Node.h"
|
|
#import "OutputAVFoundation.h"
|
|
|
|
@interface OutputNode : Node {
|
|
AudioStreamBasicDescription format;
|
|
uint32_t config;
|
|
|
|
double amountPlayed;
|
|
double amountPlayedInterval;
|
|
OutputAVFoundation *output;
|
|
|
|
BOOL paused;
|
|
BOOL started;
|
|
BOOL intervalReported;
|
|
}
|
|
|
|
- (void)beginEqualizer:(AudioUnit)eq;
|
|
- (void)refreshEqualizer:(AudioUnit)eq;
|
|
- (void)endEqualizer:(AudioUnit)eq;
|
|
|
|
- (double)amountPlayed;
|
|
- (double)amountPlayedInterval;
|
|
|
|
- (void)incrementAmountPlayed:(double)seconds;
|
|
- (void)resetAmountPlayed;
|
|
- (void)resetAmountPlayedInterval;
|
|
|
|
- (BOOL)selectNextBuffer;
|
|
- (void)endOfInputPlayed;
|
|
|
|
- (BOOL)chainQueueHasTracks;
|
|
|
|
- (double)secondsBuffered;
|
|
|
|
- (void)setup;
|
|
- (void)process;
|
|
- (void)close;
|
|
- (void)seek:(double)time;
|
|
|
|
- (AudioChunk *)readChunk:(size_t)amount;
|
|
|
|
- (void)setFormat:(AudioStreamBasicDescription *)f channelConfig:(uint32_t)channelConfig;
|
|
- (AudioStreamBasicDescription)format;
|
|
- (uint32_t)config;
|
|
|
|
- (void)setVolume:(double)v;
|
|
|
|
- (void)setShouldContinue:(BOOL)s;
|
|
|
|
- (void)pause;
|
|
- (void)resume;
|
|
|
|
- (BOOL)isPaused;
|
|
|
|
- (void)sustainHDCD;
|
|
|
|
- (void)restartPlaybackAtCurrentPosition;
|
|
|
|
@end
|