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