cog/Audio/Chain/Converter.h

45 lines
898 B
C
Raw Normal View History

2006-01-20 15:34:02 +00:00
//
// ConverterNode.h
2006-01-20 15:34:02 +00:00
// Cog
//
// Created by Vincent Spader on 8/2/05.
// Copyright 2005 Vincent Spader. All rights reserved.
2006-01-20 15:34:02 +00:00
//
#import <Cocoa/Cocoa.h>
#import <CoreAudio/AudioHardware.h>
#import <AudioToolbox/AudioToolbox.h>
#import <AudioUnit/AudioUnit.h>
@interface Converter : NSObject
{
2006-01-20 15:34:02 +00:00
AudioConverterRef converter;
void *outputBuffer;
int outputBufferSize;
//Temporary for callback use
2007-03-03 21:13:25 +00:00
void *inputBuffer;
int inputBufferSize;
BOOL needsReset;
//end
int outputSize;
2006-01-20 15:34:02 +00:00
AudioStreamBasicDescription inputFormat;
AudioStreamBasicDescription outputFormat;
}
- (void *)outputBuffer;
- (int)outputBufferSize;
2006-01-20 15:34:02 +00:00
- (void)setupWithInputFormat:(AudioStreamBasicDescription)inputFormat outputFormat:(AudioStreamBasicDescription)outputFormat;
- (void)cleanUp;
2007-05-26 22:13:11 +00:00
- (void)reset;
//Returns the amount actually read from input
2007-03-03 21:13:25 +00:00
- (int)convert:(void *)input amount:(int)inputSize;
2006-01-20 15:34:02 +00:00
@end