-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathSPExporter.h
More file actions
147 lines (108 loc) · 3.96 KB
/
Copy pathSPExporter.h
File metadata and controls
147 lines (108 loc) · 3.96 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
#import <Cocoa/Cocoa.h>
#import <AudioToolbox/AudioToolbox.h>
#import "PlayerLibSidplayWrapper.h"
#import "PlaybackSettings.h"
@class SPPlayerWindow;
@class SPExportController;
@class SPExportItem;
enum ExportFileType
{
EXPORT_TYPE_MP3 = 0,
EXPORT_TYPE_AAC,
EXPORT_TYPE_ALAC,
EXPORT_TYPE_AIFF,
EXPORT_TYPE_PRG,
EXPORT_TYPE_PSID,
NUM_EXPORT_TYPES
};
@interface ExportSettings : NSObject
{
enum ExportFileType mFileType;
NSUInteger mTimeInSeconds;
BOOL mWithFadeOut;
int mFadeOutTime;
int mBitRate;
BOOL mUseVBR;
float mQuality;
BOOL mBlankScreen;
BOOL mIncludeStilComment;
BOOL mCompressOutputFile;
}
@property enum ExportFileType mFileType;
@property NSUInteger mTimeInSeconds;
@property BOOL mWithFadeOut;
@property int mFadeOutTime;
@property int mBitRate;
@property BOOL mUseVBR;
@property float mQuality;
@property BOOL mBlankScreen;
@property BOOL mIncludeStilComment;
@property BOOL mCompressOutputFile;
@end
@interface SPExporter : NSObject
{
SPExportController* controller;
SPPlayerWindow* ownerWindow;
PlayerLibSidplayWrapper* player;
struct PlaybackSettings settings;
SPExportItem* exportItem;
BOOL exportItemLoaded;
BOOL exportStopped;
BOOL exportInProgress;
BOOL exportProgressIsIndeterminate;
ExportSettings *exportSettings;
ExtAudioFileRef outputFileRef;
NSUInteger samplesRemaining;
NSUInteger samplesCompleted;
AudioStreamBasicDescription inputFormat;
AudioStreamBasicDescription outputFormat;
NSString* title;
NSString* author;
NSString* releaseInfo;
NSTask* psid64Task;
NSString* destinationPath;
NSString* fileName;
NSImage* fileIcon;
float exportProgress;
}
- (instancetype) initWithItem:(SPExportItem*)item withController:(SPExportController*)theController andWindow:(SPPlayerWindow*)window loadNow:(BOOL)loadItem NS_DESIGNATED_INITIALIZER;
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL loadExportItem;
- (void) unloadExportItem;
- (void) determineExportFilePath:(NSString*)directoryPath;
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSString *suggestedFileExtension;
@property (NS_NONATOMIC_IOSONLY, readonly, copy) NSString *suggestedFilename;
@property (NS_NONATOMIC_IOSONLY, copy) NSString *fileName;
- (void) setDestinationPath:(NSString*)path;
@property (NS_NONATOMIC_IOSONLY) ExportSettings* exportSettings;
@property (NS_NONATOMIC_IOSONLY, copy) NSImage *fileIcon;
@property (NS_NONATOMIC_IOSONLY, readonly) PlayerLibSidplayWrapper *player;
@property (NS_NONATOMIC_IOSONLY, readonly) BOOL exportInProgress;
@property (NS_NONATOMIC_IOSONLY) BOOL exportProgressIsIndeterminate;
@property (NS_NONATOMIC_IOSONLY) BOOL exportStopped;
@property (NS_NONATOMIC_IOSONLY) float exportProgress;
- (void) startExport;
- (void) stopExport;
- (void) exportUsingExtAudioFileThread:(id)inObject;
- (void) exportUsingLameThread:(id)inObject;
- (void) exportUsingPsid64;
- (void) exportCompletedNotification:(NSError*)error;
- (void) exportInProgressNotification:(id)progress;
- (void) psid64TaskFinished:(NSNotification*)aNotification;
@end
@interface SPExportItem : NSObject
{
NSString* path;
NSString* title;
NSString* author;
int subtune;
int loopCount;
SPExporter* exporter;
}
- (instancetype) initWithPath:(NSString*)filePath andTitle:(NSString*)titleString andAuthor:(NSString*)authorString andSubtune:(int)subtuneIndex andLoopCount:(int)loops NS_DESIGNATED_INITIALIZER;
@property (NS_NONATOMIC_IOSONLY, copy) NSString *path;
@property (NS_NONATOMIC_IOSONLY, copy) NSString *title;
@property (NS_NONATOMIC_IOSONLY, copy) NSString *author;
@property (NS_NONATOMIC_IOSONLY) int subtune;
@property (NS_NONATOMIC_IOSONLY) int loopCount;
@property (NS_NONATOMIC_IOSONLY, strong) SPExporter *exporter;
@end