Merge pull request #1 from Acaki/feat/surround_sound

Add config to set audio channels
This commit is contained in:
TrueZhuanJia
2025-07-08 11:59:58 +08:00
committed by GitHub
99 changed files with 5986 additions and 3708 deletions
@@ -824,6 +824,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);