cog/SoundFile/SoundFile.h

59 lines
1.2 KiB
C
Raw Normal View History

2005-06-02 18:16:43 +00:00
//
// SoundFile.h
// Cog
//
// Created by Vincent Spader on 1/15/05.
// Copyright 2005 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#import <CoreAudio/AudioHardware.h>
#import <AudioToolbox/AudioToolbox.h>
#import <AudioUnit/AudioUnit.h>
#import "DBLog.h"
@interface SoundFile : NSObject {
UInt16 bitsPerSample;
UInt16 channels;
UInt32 frequency;
UInt32 bitRate;
BOOL isBigEndian;
BOOL isUnsigned;
unsigned long totalSize;
unsigned long currentPosition;
}
- (unsigned long)totalSize;
- (unsigned long)currentPosition;
- (double)length;
- (int)bitRate;
+ (SoundFile *)soundFileFromFilename:(NSString *)filename; //PRIVATE
+ (SoundFile *)open:(NSString *)filename;
+ (SoundFile *)readInfo:(NSString *)filename;
- (BOOL)open:(const char *)filename;
- (void)getFormat:(AudioStreamBasicDescription *)sourceStreamFormat;
- (BOOL)readInfo:(const char *)filename; //for getting information
2005-06-29 15:28:20 +00:00
- (int)fillBuffer:(void *)buf ofSize:(UInt32)size;
2005-06-02 18:16:43 +00:00
//- (BOOL)seek:(unsigned long)position;
- (double)seekToTime:(double)milliseconds;
2005-06-02 18:16:43 +00:00
- (void)close;
- (void)reset; //START AGAIN
- (UInt16)channels;
- (UInt16)bitsPerSample;
- (UInt32)frequency;
-(BOOL)isBigEndian;
-(BOOL)isUnsigned;
@end