diff --git a/VoidLink/Base.lproj/iPad.storyboard b/VoidLink/Base.lproj/iPad.storyboard index 404632a4..5ef22b92 100644 --- a/VoidLink/Base.lproj/iPad.storyboard +++ b/VoidLink/Base.lproj/iPad.storyboard @@ -1,8 +1,8 @@ - + - + @@ -846,12 +846,38 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/VoidLink/Base.lproj/iPhone.storyboard b/VoidLink/Base.lproj/iPhone.storyboard index 11bfded0..0d628cca 100644 --- a/VoidLink/Base.lproj/iPhone.storyboard +++ b/VoidLink/Base.lproj/iPhone.storyboard @@ -1,8 +1,8 @@ - + - + @@ -13,7 +13,7 @@ - + @@ -80,7 +80,7 @@ - + @@ -636,12 +636,12 @@ - + - + @@ -1496,6 +1496,30 @@ + + + + + + + + + + + + + + + + + + + @@ -1592,16 +1616,16 @@ - + - + - + - + diff --git a/VoidLink/ViewControllers/MainFrameViewController.m b/VoidLink/ViewControllers/MainFrameViewController.m index 7ddb8dc3..b9ce4791 100644 --- a/VoidLink/ViewControllers/MainFrameViewController.m +++ b/VoidLink/ViewControllers/MainFrameViewController.m @@ -821,6 +821,10 @@ static NSMutableSet* hostList; // Probe for supported channel configurations int physicalOutputChannels = (int)[AVAudioSession sharedInstance].maximumOutputNumberOfChannels; Log(LOG_I, @"Audio device supports %d channels", physicalOutputChannels); + if (@available(iOS 18.0, tvOS 18.0, *)) { + physicalOutputChannels = 8; + Log(LOG_I, @"System-provided spatial audio available, pretending device has %d channels", physicalOutputChannels); + } int numberOfChannels = MIN([streamSettings.audioConfig intValue], physicalOutputChannels); Log(LOG_I, @"Selected number of audio channels %d", numberOfChannels); diff --git a/VoidLink/ViewControllers/SettingsViewController.h b/VoidLink/ViewControllers/SettingsViewController.h index 0dbbcea0..63660a3e 100644 --- a/VoidLink/ViewControllers/SettingsViewController.h +++ b/VoidLink/ViewControllers/SettingsViewController.h @@ -44,6 +44,7 @@ @property (strong, nonatomic) IBOutlet UISwitch *multiControllerSwitch; @property (strong, nonatomic) IBOutlet UIStackView *swapAbaxyStack; @property (strong, nonatomic) IBOutlet UIStackView *audioOnPcStack; +@property (strong, nonatomic) IBOutlet UIStackView *audioConfigStack; @property (strong, nonatomic) IBOutlet UISwitch *audioOnPcSwitch; @property (strong, nonatomic) IBOutlet UIStackView *codecStack; @property (strong, nonatomic) IBOutlet UIStackView *yuv444Stack; @@ -72,6 +73,7 @@ @property (strong, nonatomic) IBOutlet UISegmentedControl *codecSelector; @property (strong, nonatomic) IBOutlet UISwitch *hdrSwitch; @property (strong, nonatomic) IBOutlet UISwitch *yuv444Switch; +@property (strong, nonatomic) IBOutlet UISegmentedControl *audioConfigSelector; @property (strong, nonatomic) IBOutlet UISegmentedControl *framePacingSelector; @property (strong, nonatomic) IBOutlet UISegmentedControl *reverseMouseWheelDirectionSelector; @property (strong, nonatomic) IBOutlet UISegmentedControl *statsOverlaySelector; diff --git a/VoidLink/ViewControllers/SettingsViewController.m b/VoidLink/ViewControllers/SettingsViewController.m index 34c5dc5e..4d961825 100644 --- a/VoidLink/ViewControllers/SettingsViewController.m +++ b/VoidLink/ViewControllers/SettingsViewController.m @@ -538,6 +538,7 @@ BOOL isCustomResolution(CGSize res) { } [self addSetting:self.audioOnPcStack ofId:@"audioOnPcStack" withInfoTag:NO withDynamicLabel:NO to:audioSection]; + [self addSetting:self.audioConfigStack ofId:@"audioConfigStack" withInfoTag:YES withDynamicLabel:NO to:audioSection]; [audioSection addToParentStack:_parentStack]; [audioSection setExpanded:YES]; @@ -1272,6 +1273,21 @@ BOOL isCustomResolution(CGSize res) { [self.bitrateSlider addTarget:self action:@selector(bitrateSliderMoved) forControlEvents:UIControlEventValueChanged]; [self updateBitrateText]; [self updateResolutionDisplayLabel]; + if (@available(iOS 18.0, tvOS 18.0, *)) {}else{ + [self.audioConfigSelector removeSegmentAtIndex:1 animated:false]; + [self.audioConfigSelector removeSegmentAtIndex:2 animated:false]; + } + switch ([currentSettings.audioConfig integerValue]) { + case 2: + [self.audioConfigSelector setSelectedSegmentIndex:0]; + break; + case 6: + [self.audioConfigSelector setSelectedSegmentIndex:1]; + break; + case 8: + [self.audioConfigSelector setSelectedSegmentIndex:2]; + break; + } // Unlock Display Orientation setting // bool unlockDisplayOrientationSelectorEnabled = [self isFullScreenRequired];//need "requires fullscreen" enabled in the app bunddle to make runtime orientation limitation woring @@ -1880,7 +1896,7 @@ BOOL isCustomResolution(CGSize res) { selector.selectedSegmentTintColor = [ThemeManager appSecondaryColor]; } else { // Fallback on earlier versions - } + } } [self updateThemeForSelectors:subview]; } @@ -1912,6 +1928,7 @@ BOOL isCustomResolution(CGSize res) { NSInteger framerate = [self getChosenFrameRate]; NSInteger height = [self getChosenStreamHeight]; NSInteger width = [self getChosenStreamWidth]; + NSInteger audioConfig = [@[@2, @6, @8][[self.audioConfigSelector selectedSegmentIndex]] integerValue]; NSInteger onscreenControls = [self.onScreenWidgetSelector selectedSegmentIndex]; NSInteger keyboardToggleFingers = self.softKeyboardGestureSelector.selectedSegmentIndex == 3 ? 20 : self.softKeyboardGestureSelector.selectedSegmentIndex+3; NSInteger oscLayoutToolFingers = (uint16_t)self->oswLayoutFingers; @@ -1951,7 +1968,7 @@ BOOL isCustomResolution(CGSize res) { framerate:framerate height:height width:width - audioConfig:2 // Stereo + audioConfig:audioConfig onscreenControls:onscreenControls gyroMode:gyroMode keyboardToggleFingers:keyboardToggleFingers diff --git a/VoidLink/mul.lproj/iPad.xcstrings b/VoidLink/mul.lproj/iPad.xcstrings index 09fe5dd3..0e6341bb 100644 --- a/VoidLink/mul.lproj/iPad.xcstrings +++ b/VoidLink/mul.lproj/iPad.xcstrings @@ -1243,6 +1243,36 @@ } } }, + "eOT-gu-uEu.text" : { + "comment" : "Class = \"UILabel\"; text = \"Audio Configuration\"; ObjectID = \"eOT-gu-uEu\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Audio Configuration" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "声道配置" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "聲道設定" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "聲道設定" + } + } + } + }, "FJv-HJ-UYJ.text" : { "comment" : "Class = \"UILabel\"; text = \"Touch Move Event Interval\"; ObjectID = \"FJv-HJ-UYJ\";", "extractionState" : "extracted_with_value", @@ -1525,6 +1555,60 @@ } } }, + "iZL-dA-jk9.segmentTitles[0]" : { + "comment" : "Class = \"UISegmentedControl\"; iZL-dA-jk9.segmentTitles[0] = \"Stereo\"; ObjectID = \"iZL-dA-jk9\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Stereo" + } + }, + "zh-Hans" : { + "stringUnit" : { + "state" : "translated", + "value" : "两声道" + } + }, + "zh-Hant" : { + "stringUnit" : { + "state" : "translated", + "value" : "兩聲道" + } + }, + "zh-HK" : { + "stringUnit" : { + "state" : "translated", + "value" : "兩聲道" + } + } + } + }, + "iZL-dA-jk9.segmentTitles[1]" : { + "comment" : "Class = \"UISegmentedControl\"; iZL-dA-jk9.segmentTitles[1] = \"LPCM 5.1\"; ObjectID = \"iZL-dA-jk9\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "LPCM 5.1" + } + } + } + }, + "iZL-dA-jk9.segmentTitles[2]" : { + "comment" : "Class = \"UISegmentedControl\"; iZL-dA-jk9.segmentTitles[2] = \"LPCM 7.1\"; ObjectID = \"iZL-dA-jk9\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "LPCM 7.1" + } + } + } + }, "kho-5R-daP.segmentTitles[0]" : { "comment" : "Class = \"UISegmentedControl\"; kho-5R-daP.segmentTitles[0] = \"3 Finger Tap\"; ObjectID = \"kho-5R-daP\";", "extractionState" : "extracted_with_value", diff --git a/VoidLink/mul.lproj/iPhone.xcstrings b/VoidLink/mul.lproj/iPhone.xcstrings index 6cbbb417..9286c528 100644 --- a/VoidLink/mul.lproj/iPhone.xcstrings +++ b/VoidLink/mul.lproj/iPhone.xcstrings @@ -1453,6 +1453,42 @@ } } }, + "hfR-K8-Ti4.segmentTitles[0]" : { + "comment" : "Class = \"UISegmentedControl\"; hfR-K8-Ti4.segmentTitles[0] = \"Stereo\"; ObjectID = \"hfR-K8-Ti4\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Stereo" + } + } + } + }, + "hfR-K8-Ti4.segmentTitles[1]" : { + "comment" : "Class = \"UISegmentedControl\"; hfR-K8-Ti4.segmentTitles[1] = \"LPCM 5.1\"; ObjectID = \"hfR-K8-Ti4\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "LPCM 5.1" + } + } + } + }, + "hfR-K8-Ti4.segmentTitles[2]" : { + "comment" : "Class = \"UISegmentedControl\"; hfR-K8-Ti4.segmentTitles[2] = \"LPCM 7.1\"; ObjectID = \"hfR-K8-Ti4\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "LPCM 7.1" + } + } + } + }, "hn6-X9-TaI.text" : { "comment" : "Class = \"UILabel\"; text = \"Mouse Pointer Velocity\"; ObjectID = \"hn6-X9-TaI\";", "extractionState" : "extracted_with_value", @@ -2077,6 +2113,18 @@ } } }, + "qeW-hW-tSL.text" : { + "comment" : "Class = \"UILabel\"; text = \"Audio Configuration\"; ObjectID = \"qeW-hW-tSL\";", + "extractionState" : "extracted_with_value", + "localizations" : { + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Audio Configuration" + } + } + } + }, "qPQ-U2-aSg.text" : { "comment" : "Class = \"UILabel\"; text = \"test\"; ObjectID = \"qPQ-U2-aSg\";", "extractionState" : "extracted_with_value",