Improve PortAudio channel autodetection algorithm to workaround PulseAudio issues
This commit is contained in:
parent
987d104a6c
commit
2cd4851601
1 changed files with 6 additions and 1 deletions
|
|
@ -151,7 +151,12 @@ int PortAudioRenderer::detectAudioConfiguration()
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (deviceInfo->maxOutputChannels > 2) {
|
// PulseAudio reports max output channels that don't
|
||||||
|
// correspond to any output devices (32 channels), so
|
||||||
|
// only use 5.1 surround sound if the output channel count
|
||||||
|
// is reasonable. Additionally, PortAudio doesn't do remixing
|
||||||
|
// for quadraphonic, so only use 5.1 if we have 6 or more channels.
|
||||||
|
if (deviceInfo->maxOutputChannels == 6 || deviceInfo->maxOutputChannels == 8) {
|
||||||
return AUDIO_CONFIGURATION_51_SURROUND;
|
return AUDIO_CONFIGURATION_51_SURROUND;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue