system: re-enable sound for console mode on macOS 11.3

This commit is contained in:
osy 2021-03-04 22:30:56 -08:00
parent 40c04d3d33
commit d6ccf4db9b
1 changed files with 8 additions and 9 deletions

View File

@ -511,16 +511,15 @@ static size_t sysctl_read(const char *name) {
} }
[self pushArgv:@"-m"]; [self pushArgv:@"-m"];
[self pushArgv:[self.configuration.systemMemory stringValue]]; [self pushArgv:[self.configuration.systemMemory stringValue]];
#if TARGET_OS_OSX // < macOS 11.3 we use fork() which is buggy and things are broken
// FIXME: sound support broken after fork(), so we disable for now if (@available(macOS 11.3, *)) {
if (!self.configuration.displayConsoleOnly) if (self.configuration.soundEnabled) {
#endif
if (self.configuration.soundEnabled) {
[self pushArgv:@"-device"];
[self pushArgv:self.configuration.soundCard];
if ([self.configuration.soundCard containsString:@"hda"]) {
[self pushArgv:@"-device"]; [self pushArgv:@"-device"];
[self pushArgv:@"hda-duplex"]; [self pushArgv:self.configuration.soundCard];
if ([self.configuration.soundCard containsString:@"hda"]) {
[self pushArgv:@"-device"];
[self pushArgv:@"hda-duplex"];
}
} }
} }
[self pushArgv:@"-name"]; [self pushArgv:@"-name"];