2005-06-02 18:16:43 +00:00
|
|
|
//
|
|
|
|
// FlacFile.h
|
|
|
|
// zyVorbis
|
|
|
|
//
|
|
|
|
// Created by Vincent Spader on 1/25/05.
|
2005-07-02 21:02:06 +00:00
|
|
|
// Copyright 2005 Vincent Spader All rights reserved.
|
2005-06-02 18:16:43 +00:00
|
|
|
//
|
|
|
|
|
|
|
|
#import <Cocoa/Cocoa.h>
|
2005-06-29 15:28:20 +00:00
|
|
|
#import "FLAC/all.h"
|
2005-06-02 18:16:43 +00:00
|
|
|
|
|
|
|
#define SAMPLES_PER_WRITE 512
|
2021-12-11 08:22:19 +00:00
|
|
|
#define FLAC__MAX_SUPPORTED_CHANNELS 8
|
2007-11-24 20:16:27 +00:00
|
|
|
#define SAMPLE_blockBuffer_SIZE ((FLAC__MAX_BLOCK_SIZE + SAMPLES_PER_WRITE) * FLAC__MAX_SUPPORTED_CHANNELS * (24/8))
|
2005-06-02 18:16:43 +00:00
|
|
|
|
2007-02-24 20:36:27 +00:00
|
|
|
#import "Plugin.h"
|
|
|
|
|
|
|
|
@interface FlacDecoder : NSObject <CogDecoder>
|
|
|
|
{
|
2007-03-04 21:32:03 +00:00
|
|
|
FLAC__StreamDecoder *decoder;
|
2007-11-24 20:16:27 +00:00
|
|
|
void *blockBuffer;
|
|
|
|
int blockBufferFrames;
|
2007-02-24 20:36:27 +00:00
|
|
|
|
2007-03-04 21:32:03 +00:00
|
|
|
id<CogSource> source;
|
|
|
|
|
|
|
|
BOOL endOfStream;
|
|
|
|
|
2007-02-24 20:36:27 +00:00
|
|
|
int bitsPerSample;
|
|
|
|
int channels;
|
|
|
|
float frequency;
|
2007-11-24 20:16:27 +00:00
|
|
|
long totalFrames;
|
2013-10-11 14:25:41 +00:00
|
|
|
|
2021-12-11 08:22:19 +00:00
|
|
|
long fileSize;
|
|
|
|
|
2013-10-11 14:25:41 +00:00
|
|
|
BOOL hasStreamInfo;
|
2005-06-02 18:16:43 +00:00
|
|
|
}
|
|
|
|
|
2007-03-04 21:32:03 +00:00
|
|
|
- (void)setSource:(id<CogSource>)s;
|
|
|
|
- (id<CogSource>)source;
|
|
|
|
|
|
|
|
- (void)setEndOfStream:(BOOL)eos;
|
|
|
|
- (BOOL)endOfStream;
|
|
|
|
|
2021-12-11 08:22:19 +00:00
|
|
|
- (void)setSize:(long)size;
|
|
|
|
|
2007-03-04 21:32:03 +00:00
|
|
|
- (FLAC__StreamDecoder *)decoder;
|
2007-11-24 20:16:27 +00:00
|
|
|
- (char *)blockBuffer;
|
|
|
|
- (int)blockBufferFrames;
|
|
|
|
- (void)setBlockBufferFrames:(int)frames;
|
2005-06-02 18:16:43 +00:00
|
|
|
|
|
|
|
@end
|