mirror of
https://github.com/zakk4223/CocoaSplit.git
synced 2026-05-15 14:15:50 -06:00
Add sorting to all instances of output track lists
This commit is contained in:
parent
d51bd2a43c
commit
14897b2784
10 changed files with 53 additions and 2 deletions
|
|
@ -227,7 +227,7 @@ OSStatus VTCompressionSessionCopySupportedPropertyDictionary(VTCompressionSessio
|
|||
|
||||
|
||||
NSArray *nsEnc = (__bridge NSArray *)(encoders);
|
||||
|
||||
|
||||
for (NSDictionary *encode in nsEnc)
|
||||
{
|
||||
|
||||
|
|
|
|||
|
|
@ -25,6 +25,7 @@
|
|||
@property (weak) IBOutlet CAMultiAudioEffectsTableController *effectsController;
|
||||
@property (weak) NSObject *delegate;
|
||||
@property (strong) IBOutlet NSDictionaryController *audioTracksDictionaryController;
|
||||
@property (readonly) NSArray *trackSortDescriptors;
|
||||
|
||||
- (IBAction)matrixVolumeChanged:(NSSlider *)sender;
|
||||
|
||||
|
|
|
|||
|
|
@ -99,6 +99,19 @@
|
|||
self.audioNode = node;
|
||||
self.downMixer = node.downMixer;
|
||||
|
||||
NSSortDescriptor *nameSort = [NSSortDescriptor sortDescriptorWithKey:@"value.name" ascending:YES comparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
|
||||
NSString *name1 = obj1;
|
||||
NSString *name2 = obj2;
|
||||
|
||||
if ([name1 isEqualToString:@"Default"])
|
||||
{
|
||||
return (NSComparisonResult)NSOrderedAscending;
|
||||
}
|
||||
|
||||
return [name1 compare:name2];
|
||||
}];
|
||||
|
||||
_trackSortDescriptors = @[nameSort];
|
||||
//NSView *audioView = [node audioUnitNSView];
|
||||
// NSLog(@"AUDIO VIEW SIZE %@", NSStringFromRect(audioView.frame));
|
||||
//self.window.contentView = audioView;
|
||||
|
|
|
|||
|
|
@ -278,6 +278,7 @@
|
|||
<dictionaryController objectClassName="_NSDictionaryControllerKeyValuePair" id="OYm-wd-HNd" userLabel="audioTracksController">
|
||||
<connections>
|
||||
<binding destination="eFT-P1-fYd" name="contentDictionary" keyPath="selection.outputTracks" id="KH1-le-KhS"/>
|
||||
<binding destination="-2" name="sortDescriptors" keyPath="self.trackSortDescriptors" id="kB5-Gd-Cpe"/>
|
||||
</connections>
|
||||
</dictionaryController>
|
||||
<viewController id="hhG-Ht-ou8" customClass="CAMultiAudioEffectsViewController">
|
||||
|
|
|
|||
|
|
@ -19,4 +19,6 @@
|
|||
@property (strong) IBOutlet NSDictionaryController *outputTracksController;
|
||||
|
||||
@property (weak) IBOutlet CAMultiAudioEffectsTableController *effectsController;
|
||||
@property (readonly) NSArray *trackSortDescriptors;
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -17,7 +17,25 @@
|
|||
|
||||
-(instancetype) init
|
||||
{
|
||||
return [self initWithWindowNibName:@"CSAdvancedAudioWindowController"];
|
||||
|
||||
if (self = [self initWithWindowNibName:@"CSAdvancedAudioWindowController"])
|
||||
{
|
||||
NSSortDescriptor *nameSort = [NSSortDescriptor sortDescriptorWithKey:@"value.name" ascending:YES comparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
|
||||
NSString *name1 = obj1;
|
||||
NSString *name2 = obj2;
|
||||
|
||||
if ([name1 isEqualToString:@"Default"])
|
||||
{
|
||||
return (NSComparisonResult)NSOrderedAscending;
|
||||
}
|
||||
|
||||
return [name1 compare:name2];
|
||||
}];
|
||||
|
||||
_trackSortDescriptors = @[nameSort];
|
||||
}
|
||||
|
||||
return self;
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -434,6 +434,7 @@
|
|||
<dictionaryController objectClassName="_NSDictionaryControllerKeyValuePair" id="HGe-Xd-c37" userLabel="outputTracksController">
|
||||
<connections>
|
||||
<binding destination="dRe-6o-71e" name="contentDictionary" keyPath="selection.outputTracks" id="y0v-XJ-HL8"/>
|
||||
<binding destination="-2" name="sortDescriptors" keyPath="self.trackSortDescriptors" id="c2S-5t-VqQ"/>
|
||||
</connections>
|
||||
</dictionaryController>
|
||||
<arrayController id="C6s-yq-C8q" userLabel="effectsChainController"/>
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
@property (nonatomic, copy) void (^windowDone)(NSModalResponse response, CSNewOutputWindowController *windowController);
|
||||
|
||||
@property (strong) IBOutlet NSDictionaryController *audioTracksDictionaryController;
|
||||
@property (readonly) NSArray *trackSortDescriptors;
|
||||
|
||||
|
||||
@end
|
||||
|
|
|
|||
|
|
@ -26,6 +26,19 @@
|
|||
self.outputTypes = servicePlugins.allKeys;
|
||||
_outputDestination = [[OutputDestination alloc] init];
|
||||
self.buttonLabel = @"Add";
|
||||
NSSortDescriptor *nameSort = [NSSortDescriptor sortDescriptorWithKey:@"value.name" ascending:YES comparator:^NSComparisonResult(id _Nonnull obj1, id _Nonnull obj2) {
|
||||
NSString *name1 = obj1;
|
||||
NSString *name2 = obj2;
|
||||
|
||||
if ([name1 isEqualToString:@"Default"])
|
||||
{
|
||||
return (NSComparisonResult)NSOrderedAscending;
|
||||
}
|
||||
|
||||
return [name1 compare:name2];
|
||||
}];
|
||||
|
||||
_trackSortDescriptors = @[nameSort];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
|
|
|||
|
|
@ -367,6 +367,7 @@ Gw
|
|||
<dictionaryController objectClassName="_NSDictionaryControllerKeyValuePair" id="yfp-Da-Yi4" userLabel="outputAudioTracksController">
|
||||
<connections>
|
||||
<binding destination="I41-1j-4DV" name="contentDictionary" keyPath="selection.audioTracks" id="IJC-5S-D4b"/>
|
||||
<binding destination="-2" name="sortDescriptors" keyPath="self.trackSortDescriptors" id="zOr-xn-joo"/>
|
||||
</connections>
|
||||
</dictionaryController>
|
||||
</objects>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue