Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

57 lines (47 sloc) 2.077 kb
/*
* Copyright (C) 2008 Stephen F. Booth <me@sbooth.org>
* All Rights Reserved
*/
#import <Cocoa/Cocoa.h>
// ========================================
// KVC key names for the read offset dictionaries
// ========================================
extern NSString * const kReadOffsetKey; // NSNumber *, in sample frames
extern NSString * const kConfidenceLevelKey; // NSNumber *
extern NSString * const kAccurateRipTrackIDKey; // NSManagedObjectID * for an AccurateRipTrackDescriptor *
// ========================================
// An NSOperation subclass which uses AccurateRip data to detect extracted audio's read offset
// URL is assumed to point to a file containing CDDA audio with the six second
// point of the track to check occurring at sixSecondPoint
// Offsets ranging from -maximumOffsetToCheck to +maximumOffsetToCheck will be
// checked
// The 2n sectors must be centered around the six second point in the specified track
// Graphically:
// |---------|----------|
// -n 6 s +n
// ========================================
@interface ReadOffsetCalculationOperation : NSOperation
{
@private
NSURL *_URL;
NSManagedObjectID *_trackID;
NSUInteger _sixSecondPointSector;
NSUInteger _maximumOffsetToCheck;
float _fractionComplete;
NSError *_error;
NSArray *_possibleReadOffsets;
}
// ========================================
// Properties affecting scanning
@property (copy) NSURL * URL;
@property (copy) NSManagedObjectID * trackID;
@property (assign) NSUInteger sixSecondPointSector; // In CDDA sectors
@property (assign) NSUInteger maximumOffsetToCheck; // In sample frames, should be a multiple of AUDIO_FRAMES_PER_CDDA_SECTOR
// ========================================
// Properties set during calculation
@property (readonly, assign) float fractionComplete;
// ========================================
// Properties set after offset calculation is complete (or cancelled)
@property (readonly, copy) NSError * error;
@property (readonly, copy) NSArray * possibleReadOffsets; // NSArray of NSDictionaries, see keys above
@end
Jump to Line
Something went wrong with that request. Please try again.