Cog/Audio/Chain/OutputNode.h
Christopher Snowhill 62edb39761 Cog Audio: Major rewrite of audio buffering
Rewrite attempt number two. Now using array lists of audio chunks, with
each chunk having its format and optionally losslessness stashed along
with it. This replaces the old virtual ring buffer method. As a result
of this, the HRIR toggle now works instantaneously.

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

65 lines
1.1 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 <CoreAudio/AudioHardware.h>
#import <AudioToolbox/AudioToolbox.h>
#import <AudioUnit/AudioUnit.h>
#import "Node.h"
#import "OutputCoreAudio.h"
@interface OutputNode : Node {
AudioStreamBasicDescription format;
double amountPlayed;
double sampleRatio;
OutputCoreAudio *output;
BOOL paused;
BOOL started;
}
- (void)beginEqualizer:(AudioUnit)eq;
- (void)refreshEqualizer:(AudioUnit)eq;
- (void)endEqualizer:(AudioUnit)eq;
- (double)amountPlayed;
- (void)incrementAmountPlayed:(double)seconds;
- (void)resetAmountPlayed;
- (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;
- (AudioStreamBasicDescription) format;
- (void)setVolume:(double) v;
- (void)setShouldContinue:(BOOL)s;
- (void)pause;
- (void)resume;
- (BOOL)isPaused;
- (void)sustainHDCD;
@end