Skip to content

Commit

Permalink
don't hardcode opus at 2 channels
Browse files Browse the repository at this point in the history
  • Loading branch information
cewert committed Sep 30, 2023
1 parent c4259a1 commit 798f1aa
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions source/utils/deviceCapabilities.brs
Original file line number Diff line number Diff line change
Expand Up @@ -472,7 +472,7 @@ function getDeviceProfile() as object

' AUDIO
' test each codec to see how many channels are supported
audioCodecs = ["mp3", "mp2", "pcm", "lpcm", "wav", "flac", "alac", "ac3", "ac4", "aiff", "dts", "wmapro", "vorbis", "eac3", "mpg123"]
audioCodecs = ["mp3", "mp2", "opus", "pcm", "lpcm", "wav", "flac", "alac", "ac3", "ac4", "aiff", "dts", "wmapro", "vorbis", "eac3", "mpg123"]
audioChannels = [8, 6, 2] ' highest first
for each audioCodec in audioCodecs
for each audioChannel in audioChannels
Expand Down Expand Up @@ -545,26 +545,6 @@ function getDeviceProfile() as object
end for
end if

' OPUS, WMA
' CanDecodeVideo() wrongly reports these codecs as having multichannel support
' hardcode them at 2 channels max
for each audioCodec in ["opus", "wma"]
for each codecType in ["VideoAudio", "Audio"]
deviceProfile.CodecProfiles.push({
"Type": codecType,
"Codec": audioCodec,
"Conditions": [
{
"Condition": "LessThanEqual",
"Property": "AudioChannels",
"Value": "2",
"IsRequired": true
}
]
})
end for
end for

' H264
h264Mp4LevelSupported = 0.0
h264TsLevelSupported = 0.0
Expand Down

0 comments on commit 798f1aa

Please sign in to comment.