Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[AE] drop AE_FMT_LPCM from non-CoreAudio builds
AE has a separate AEDataFormat AE_FMT_LPCM for multichannel PCM audio. However, the data content is actually the same as AE_FMT_FLOAT, and AE_FMT_LPCM is only used by CoreAudioAE. CoreAudio uses the AE_FMT_FLOAT <=> AE_FMT_LPCM differentation to enter a special "hog" mode, which is reportedly needed for multichannel HDMI playback on CoreAudio. AE_FMT_LPCM mode is entered on CoreAudio systems instead of AE_FMT_FLOAT (or other regular modes) when the multichannel LPCM playback option is enabled in audio settings and the output device type is HDMI. Since AE_FMT_LPCM has no meaning outside CoreAudio, clearly mark it as CoreAudio specific by making it conditional on TARGET_DARWIN, to avoid confusion regarding the actual use case of that format type. AE_FMT_LPCM is currently also added in device enumeration to m_dataFormats on ALSA devices when the HDMI sink EDID contains a Short Audio Descriptor with audio code 1 (LPCM). However, that makes no sense, since the audio code simply means that the device accepts PCM input, which all HDMI audio devices have to (obviously) support according to the specification. Also, AESinkWASAPI adds AE_FMT_LPCM to m_dataFormats for devices with 4+ channels, which is pointless as there is a separate m_channelLayout member in AEAudioFormat for this purpose. Both of these can be safely removed since m_dataFormats is used for debug log purposes only (any actual users should use m_channelLayout instead, which works with all sinks). In the future CoreAudio could probably be changed to enter hog mode based on the stream channel count directly, in order to avoid having a special CoreAudio-specific format and related code in general AudioEngine part.
- Loading branch information
Showing
5 changed files
with
15 additions
and
20 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -194,7 +194,6 @@ void CAEELDParser::Parse(const uint8_t *data, size_t length, CAEDeviceInfo& info | |
case CEA_861_FORMAT_DTS : fmt = AE_FMT_DTS ; break; | ||
case CEA_861_FORMAT_DTSHD: fmt = AE_FMT_DTSHD ; break; | ||
case CEA_861_FORMAT_EAC3 : fmt = AE_FMT_EAC3 ; break; | ||
case CEA_861_FORMAT_LPCM : fmt = AE_FMT_LPCM ; break; | ||
case CEA_861_FORMAT_MLP : fmt = AE_FMT_TRUEHD; break; | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
anssih
Author
Owner
|
||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
what is this ?