Skip to content

Instantly share code, notes, and snippets.

@iluvcapra
Created March 28, 2009 08:06
Show Gist options
  • Save iluvcapra/87058 to your computer and use it in GitHub Desktop.
Save iluvcapra/87058 to your computer and use it in GitHub Desktop.
//
// Riff.h
// riff-objc
//
// Created by Jamie Hardt on 3/27/09.
// Copyright 2009 The Sound Department. All rights reserved.
//
#import <Cocoa/Cocoa.h>
#define FOURCC_MEMBER_COUNT 4
typedef UInt8 fourcc_t[FOURCC_MEMBER_COUNT];
@class RiffChunk;
@interface RiffFile : NSObject {
FILE *_fp;
const fourcc_t _signature;
BOOL _littleEndian;
}
-(id)initWithFileAtPath:(NSString *)path;
-(FILE *)file;
-(void)signature:(fourcc_t *)fcc;
-(RiffChunk *)rootChunk;
-(BOOL)littleEndian;
@end
@interface RiffChunk : NSObject {
RiffFile *_file;
UInt32 _length , _start;
const fourcc_t _sig;
}
-(RiffFile *)file;
-(UInt32)length;
-(void)signature:(fourcc_t *)fcc;
@end
@interface RiffListChunk : RiffChunk {
}
-(NSArray *)chunks;
@end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment