Cog/Audio/Chain/BufferChain.h
Christopher Snowhill 637ea4efe1 Core Audio output: Rewrote major portions
After all this rewriting, down or upmixing the audio is now handled with
the lowest latency possible, meaning that toggling the HRIR option now
takes effect immediately.

Signed-off-by: Christopher Snowhill <kode54@gmail.com>
2022-02-05 03:45:02 -08:00

80 lines
1.7 KiB
Objective-C

//
// BufferChain.h
// CogNew
//
// Created by Vincent Spader on 1/4/06.
// Copyright 2006 Vincent Spader. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import "InputNode.h"
#import "ConverterNode.h"
#import "AudioPlayer.h"
@interface BufferChain : NSObject {
InputNode *inputNode;
ConverterNode *converterNode;
AudioStreamBasicDescription inputFormat;
NSURL *streamURL;
id userInfo;
NSDictionary *rgInfo;
id finalNode; //Final buffer in the chain.
id controller;
}
- (id)initWithController:(id)c;
- (void)buildChain;
- (BOOL)open:(NSURL *)url withOutputFormatHint:(AudioStreamBasicDescription)outputFormat withRGInfo:(NSDictionary*)rgi;
//Used when changing tracks to reuse the same decoder
- (BOOL)openWithInput:(InputNode *)i withOutputFormatHint:(AudioStreamBasicDescription)outputFormat withRGInfo:(NSDictionary*)rgi;
//Used when resetting the decoder on seek
- (BOOL)openWithDecoder:(id<CogDecoder>)decoder
withOutputFormatHint:(AudioStreamBasicDescription)outputFormat
withRGInfo:(NSDictionary*)rgi;
- (void)seek:(double)time;
- (void)launchThreads;
- (InputNode *)inputNode;
- (id)finalNode;
- (id)userInfo;
- (void)setUserInfo:(id)i;
- (NSDictionary*)rgInfo;
- (void)setRGInfo:(NSDictionary *)rgi;
- (NSURL *)streamURL;
- (void)setStreamURL:(NSURL *)url;
- (void)setShouldContinue:(BOOL)s;
- (void)initialBufferFilled:(id)sender;
- (BOOL)endOfInputReached;
- (BOOL)setTrack:(NSURL *)track;
- (void)inputFormatDidChange:(AudioStreamBasicDescription)format;
- (BOOL)isRunning;
- (id)controller;
- (ConverterNode *)converter;
- (AudioStreamBasicDescription)inputFormat;
- (double)secondsBuffered;
- (void)sustainHDCD;
@end