MIDI: Make BASSMIDI the visible default
Also hide the Apple plugins from settings so they don't get activated unless there's no SoundFont configured. Signed-off-by: Christopher Snowhill <kode54@gmail.com>
This commit is contained in:
parent
a708851b63
commit
2565767be2
3 changed files with 10 additions and 3 deletions
|
@ -673,7 +673,7 @@ static BOOL consentLastEnabled = NO;
|
|||
|
||||
[userDefaultsValuesDict setObject:@(CogStatusStopped) forKey:@"lastPlaybackStatus"];
|
||||
|
||||
[userDefaultsValuesDict setObject:@"dls appl" forKey:@"midiPlugin"];
|
||||
[userDefaultsValuesDict setObject:@"BASSMIDI" forKey:@"midiPlugin"];
|
||||
|
||||
[userDefaultsValuesDict setObject:@"default" forKey:@"midi.flavor"];
|
||||
|
||||
|
@ -717,6 +717,11 @@ static BOOL consentLastEnabled = NO;
|
|||
if([[[NSUserDefaults standardUserDefaults] stringForKey:@"midiPlugin"] isEqualToString:@"FluidSynth"]) {
|
||||
[[NSUserDefaults standardUserDefaults] setValue:@"BASSMIDI" forKey:@"midiPlugin"];
|
||||
}
|
||||
|
||||
NSString *midiPlugin = [[NSUserDefaults standardUserDefaults] stringForKey:@"midiPlugin"];
|
||||
if([midiPlugin length] == 8 && [[midiPlugin substringFromIndex:4] isEqualToString:@"appl"]) {
|
||||
[[NSUserDefaults standardUserDefaults] setObject:@"BASSMIDI" forKey:@"midiPlugin"];
|
||||
}
|
||||
}
|
||||
|
||||
MASShortcut *shortcutWithMigration(NSString *oldKeyCodePrefName,
|
||||
|
|
|
@ -210,7 +210,6 @@ static OSType getOSType(const char *in_) {
|
|||
if(sauce || !plugin || [plugin isEqualToString:@"BASSMIDI"]) {
|
||||
if(sauce || !globalSoundFontPath || [globalSoundFontPath isEqualToString:@""]) {
|
||||
plugin = @"dls appl"; // Apple DLSMusicSynth if soundfont doesn't exist
|
||||
[[NSUserDefaults standardUserDefaults] setValue:plugin forKey:@"midiPlugin"];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -31,10 +31,13 @@ static void enumComponents(callback cbEnum, void *context) {
|
|||
bytes = CFStringGetCStringPtr(cfName, kCFStringEncodingUTF8);
|
||||
if(!bytes) {
|
||||
CFStringGetCString(cfName, bytesBuffer, sizeof(bytesBuffer) - 1, kCFStringEncodingUTF8);
|
||||
bytesBuffer[sizeof(bytesBuffer) - 1] = '\0';
|
||||
bytes = bytesBuffer;
|
||||
}
|
||||
AudioComponentGetDescription(comp, &tcd);
|
||||
cbEnum(context, tcd.componentSubType, tcd.componentManufacturer, bytes);
|
||||
if(tcd.componentManufacturer != kAudioUnitManufacturer_Apple) {
|
||||
cbEnum(context, tcd.componentSubType, tcd.componentManufacturer, bytes);
|
||||
}
|
||||
CFRelease(cfName);
|
||||
comp = AudioComponentFindNext(comp, &cd);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue