2006-01-20 12:34:02 -03:00
|
|
|
//
|
2006-04-02 11:44:08 -04:00
|
|
|
// BufferChain.h
|
2006-01-20 12:34:02 -03:00
|
|
|
// CogNew
|
|
|
|
//
|
2006-09-04 14:46:18 -04:00
|
|
|
// Created by Vincent Spader on 1/4/06.
|
|
|
|
// Copyright 2006 Vincent Spader. All rights reserved.
|
2006-01-20 12:34:02 -03:00
|
|
|
//
|
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
|
|
|
|
|
|
|
#import "InputNode.h"
|
2007-10-03 16:23:14 -04:00
|
|
|
#import "ConverterNode.h"
|
2007-02-24 17:36:27 -03:00
|
|
|
#import "AudioPlayer.h"
|
2006-01-20 12:34:02 -03:00
|
|
|
|
|
|
|
@interface BufferChain : NSObject {
|
|
|
|
InputNode *inputNode;
|
2007-10-03 16:23:14 -04:00
|
|
|
ConverterNode *converterNode;
|
2021-12-26 04:41:45 -03:00
|
|
|
|
|
|
|
AudioStreamBasicDescription _inputFormat;
|
2006-04-12 22:51:22 -04:00
|
|
|
|
2007-02-24 17:36:27 -03:00
|
|
|
NSURL *streamURL;
|
|
|
|
id userInfo;
|
2013-10-02 06:30:04 -03:00
|
|
|
NSDictionary *rgInfo;
|
2006-01-20 12:34:02 -03:00
|
|
|
|
|
|
|
id finalNode; //Final buffer in the chain.
|
|
|
|
|
2007-02-24 17:36:27 -03:00
|
|
|
id controller;
|
2006-01-20 12:34:02 -03:00
|
|
|
}
|
|
|
|
|
|
|
|
- (id)initWithController:(id)c;
|
|
|
|
- (void)buildChain;
|
2007-10-10 22:08:29 -04:00
|
|
|
|
2013-10-07 17:03:34 -03:00
|
|
|
- (BOOL)open:(NSURL *)url withOutputFormat:(AudioStreamBasicDescription)outputFormat withRGInfo:(NSDictionary*)rgi;
|
2007-10-10 22:08:29 -04:00
|
|
|
|
|
|
|
//Used when changing tracks to reuse the same decoder
|
2013-10-07 17:03:34 -03:00
|
|
|
- (BOOL)openWithInput:(InputNode *)i withOutputFormat:(AudioStreamBasicDescription)outputFormat withRGInfo:(NSDictionary*)rgi;
|
2007-10-10 22:08:29 -04:00
|
|
|
|
2006-04-02 16:03:12 -04:00
|
|
|
- (void)seek:(double)time;
|
2006-01-20 12:34:02 -03:00
|
|
|
|
|
|
|
- (void)launchThreads;
|
|
|
|
|
2007-10-10 22:08:29 -04:00
|
|
|
- (InputNode *)inputNode;
|
|
|
|
|
2006-01-20 12:34:02 -03:00
|
|
|
- (id)finalNode;
|
|
|
|
|
2007-02-24 17:36:27 -03:00
|
|
|
- (id)userInfo;
|
|
|
|
- (void)setUserInfo:(id)i;
|
|
|
|
|
2013-10-02 06:30:04 -03:00
|
|
|
- (NSDictionary*)rgInfo;
|
|
|
|
- (void)setRGInfo:(NSDictionary *)rgi;
|
|
|
|
|
2007-02-24 17:36:27 -03:00
|
|
|
- (NSURL *)streamURL;
|
2007-03-01 22:36:52 -03:00
|
|
|
- (void)setStreamURL:(NSURL *)url;
|
2007-02-24 17:36:27 -03:00
|
|
|
|
|
|
|
- (void)setShouldContinue:(BOOL)s;
|
|
|
|
|
2007-10-11 22:55:59 -04:00
|
|
|
- (void)initialBufferFilled:(id)sender;
|
2007-03-18 20:19:47 -04:00
|
|
|
|
2007-10-10 22:08:29 -04:00
|
|
|
- (BOOL)endOfInputReached;
|
|
|
|
- (BOOL)setTrack:(NSURL *)track;
|
2007-02-24 17:36:27 -03:00
|
|
|
|
2007-10-11 22:55:59 -04:00
|
|
|
- (void)inputFormatDidChange:(AudioStreamBasicDescription)format;
|
|
|
|
|
2013-10-12 17:52:58 -03:00
|
|
|
- (BOOL)isRunning;
|
|
|
|
|
2013-10-21 02:04:09 -03:00
|
|
|
- (id)controller;
|
|
|
|
|
2021-12-26 04:41:45 -03:00
|
|
|
- (ConverterNode *)converter;
|
|
|
|
- (AudioStreamBasicDescription)inputFormat;
|
|
|
|
|
2006-01-20 12:34:02 -03:00
|
|
|
@end
|