2005-06-02 14:16:43 -04:00
|
|
|
//
|
|
|
|
// FlacFile.h
|
|
|
|
// zyVorbis
|
|
|
|
//
|
|
|
|
// Created by Vincent Spader on 1/25/05.
|
2005-07-02 17:02:06 -04:00
|
|
|
// Copyright 2005 Vincent Spader All rights reserved.
|
2005-06-02 14:16:43 -04:00
|
|
|
//
|
|
|
|
|
2005-06-29 11:28:20 -04:00
|
|
|
#import "FLAC/all.h"
|
2022-02-07 02:49:27 -03:00
|
|
|
#import <Cocoa/Cocoa.h>
|
2005-06-02 14:16:43 -04:00
|
|
|
|
|
|
|
#define SAMPLES_PER_WRITE 512
|
2022-07-14 04:43:33 -04:00
|
|
|
#define SAMPLE_blockBuffer_SIZE ((FLAC__MAX_BLOCK_SIZE + SAMPLES_PER_WRITE) * FLAC__MAX_CHANNELS * (FLAC__MAX_BITS_PER_SAMPLE / 8))
|
2005-06-02 14:16:43 -04:00
|
|
|
|
2007-02-24 17:36:27 -03:00
|
|
|
#import "Plugin.h"
|
|
|
|
|
2023-10-03 08:55:09 -03:00
|
|
|
#import "RedundantPlaylistDataStore.h"
|
|
|
|
|
2022-02-07 02:49:27 -03:00
|
|
|
@interface FlacDecoder : NSObject <CogDecoder> {
|
2007-03-04 18:32:03 -03:00
|
|
|
FLAC__StreamDecoder *decoder;
|
2007-11-24 17:16:27 -03:00
|
|
|
void *blockBuffer;
|
|
|
|
int blockBufferFrames;
|
2022-02-07 02:49:27 -03:00
|
|
|
|
2007-03-04 18:32:03 -03:00
|
|
|
id<CogSource> source;
|
2022-02-07 02:49:27 -03:00
|
|
|
|
2007-03-04 18:32:03 -03:00
|
|
|
BOOL endOfStream;
|
2022-02-07 02:49:27 -03:00
|
|
|
|
2007-02-24 17:36:27 -03:00
|
|
|
int bitsPerSample;
|
|
|
|
int channels;
|
2022-02-07 07:06:51 -03:00
|
|
|
uint32_t channelConfig;
|
2007-02-24 17:36:27 -03:00
|
|
|
float frequency;
|
2007-11-24 17:16:27 -03:00
|
|
|
long totalFrames;
|
2022-02-07 02:49:27 -03:00
|
|
|
|
|
|
|
long fileSize;
|
|
|
|
|
|
|
|
BOOL hasStreamInfo;
|
2022-02-08 00:18:45 -03:00
|
|
|
BOOL streamOpened;
|
2022-02-09 18:44:50 -03:00
|
|
|
BOOL abortFlag;
|
|
|
|
|
2022-07-08 09:26:28 -04:00
|
|
|
NSDictionary *metaDict;
|
|
|
|
NSDictionary *icyMetaDict;
|
2022-02-12 12:16:59 -03:00
|
|
|
|
|
|
|
NSData *albumArt;
|
|
|
|
|
2022-02-15 00:54:08 -03:00
|
|
|
BOOL cuesheetFound;
|
2022-02-12 12:16:59 -03:00
|
|
|
NSString *cuesheet;
|
2023-10-03 08:55:09 -03:00
|
|
|
|
|
|
|
RedundantPlaylistDataStore *dataStore;
|
2005-06-02 14:16:43 -04:00
|
|
|
}
|
|
|
|
|
2007-03-04 18:32:03 -03:00
|
|
|
- (void)setSource:(id<CogSource>)s;
|
|
|
|
- (id<CogSource>)source;
|
|
|
|
|
|
|
|
- (void)setEndOfStream:(BOOL)eos;
|
|
|
|
- (BOOL)endOfStream;
|
|
|
|
|
2021-12-11 05:22:19 -03:00
|
|
|
- (void)setSize:(long)size;
|
|
|
|
|
2007-03-04 18:32:03 -03:00
|
|
|
- (FLAC__StreamDecoder *)decoder;
|
2007-11-24 17:16:27 -03:00
|
|
|
- (char *)blockBuffer;
|
|
|
|
- (int)blockBufferFrames;
|
|
|
|
- (void)setBlockBufferFrames:(int)frames;
|
2005-06-02 14:16:43 -04:00
|
|
|
|
|
|
|
@end
|