Skip to content

Commit

Permalink
Revise name to HDMI ARC
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelRUSF committed Sep 6, 2024
1 parent 20591f7 commit beed221
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ enum class AudioBehavior(
DOWNMIX_TO_STEREO(R.string.pref_audio_compat),

/**
* Allow only the AC3, EAC3 and DTS codecs. All others capped to stereo output
* Stream AC3, EAC3, and DTS directly. Disables TrueHD and caps other codecs to stereo.
*/
SPDIF_OUTPUT(R.string.audio_spdif)
HDMI_ARC_OUTPUT(R.string.audio_hdmi_arc)
}
Original file line number Diff line number Diff line change
Expand Up @@ -525,7 +525,7 @@ private VideoOptions buildExoPlayerOptions(@Nullable Integer forcedSubtitleIndex
userPreferences.getValue().get(UserPreferences.Companion.getAc3Enabled()),
userPreferences.getValue().get(UserPreferences.Companion.getAudioBehaviour()) == AudioBehavior.DOWNMIX_TO_STEREO,
!DeviceUtils.has4kVideoSupport(),
userPreferences.getValue().get(UserPreferences.Companion.getAudioBehaviour()) == AudioBehavior.SPDIF_OUTPUT
userPreferences.getValue().get(UserPreferences.Companion.getAudioBehaviour()) == AudioBehavior.HDMI_ARC_OUTPUT
);
internalOptions.setProfile(internalProfile);
return internalOptions;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class ExoPlayerProfile(
isAC3Enabled: Boolean,
downMixAudio: Boolean,
disable4KVideo: Boolean,
enableSPDIF: Boolean
enableARCAudio: Boolean
) : DeviceProfile() {
private val downmixSupportedAudioCodecs = arrayOf(
Codec.Audio.AAC,
Expand All @@ -50,11 +50,11 @@ class ExoPlayerProfile(
*/
private val allSupportedAudioCodecs = buildList {
addAll(downmixSupportedAudioCodecs)
if ((isAC3Enabled) || (enableSPDIF)) {
if ((isAC3Enabled) || (enableARCAudio)) {
add(Codec.Audio.AC3)
add(Codec.Audio.EAC3)
}
if (!enableSPDIF) {
if (!enableARCAudio) {
add(Codec.Audio.MLP)
add(Codec.Audio.TRUEHD)
}
Expand Down Expand Up @@ -85,7 +85,7 @@ class ExoPlayerProfile(
// Determine audio codecs for profiles
val audioCodecForTranscodingProfile = when {
downMixAudio -> downmixSupportedAudioCodecs
enableSPDIF -> downmixSPDIFSupportedAudioCodecs
enableARCAudio -> downmixSPDIFSupportedAudioCodecs
else -> allSupportedAudioCodecsWithoutFFmpegExperimental
}.joinToString(",")

Expand Down Expand Up @@ -227,7 +227,7 @@ class ExoPlayerProfile(
// Audio channel profile
add(maxAudioChannelsCodecProfile(channels = if (downMixAudio) 2 else 8))
// Add maximum audio channel profiles for SPDIF if enableSPDIF is true
if (enableSPDIF) {
if (enableARCAudio) {
add(CodecProfile().apply {
type = CodecType.VideoAudio
codec = arrayOf(
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@
<string name="past_24_hours">Past 24 hours</string>
<string name="prefer_exoplayer_ffmpeg">Prefer FFmpeg for audio playback</string>
<string name="prefer_exoplayer_ffmpeg_content">Use FFmpeg to decode audio, even if platform codecs are available.</string>
<string name="audio_spdif">SPDIF</string>
<string name="audio_hdmi_arc">HDMI ARC</string>
<plurals name="seconds">
<item quantity="one">%1$s second</item>
<item quantity="other">%1$s seconds</item>
Expand Down

0 comments on commit beed221

Please sign in to comment.