Skip to content

Commit

Permalink
Fix issue with unknown speaker layouts
Browse files Browse the repository at this point in the history
When controlling audio through obs, if audio is set to surround sound
(ex: 2.1), sound is not captured if CEF returns a speaker layout which
 obs treats as unknown (ex: FL FR FC).
This solves the issue for several CEF speaker layouts.
  • Loading branch information
pkviet authored and WizardCM committed Feb 11, 2023
1 parent 00f1396 commit ea9f59d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions browser-client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,12 +478,16 @@ static speaker_layout GetSpeakerLayout(CefAudioHandler::ChannelLayout cefLayout)
case CEF_CHANNEL_LAYOUT_STEREO:
return SPEAKERS_STEREO; /**< Channels: FL, FR */
case CEF_CHANNEL_LAYOUT_2POINT1:
case CEF_CHANNEL_LAYOUT_2_1:
case CEF_CHANNEL_LAYOUT_SURROUND:
return SPEAKERS_2POINT1; /**< Channels: FL, FR, LFE */
case CEF_CHANNEL_LAYOUT_2_2:
case CEF_CHANNEL_LAYOUT_QUAD:
case CEF_CHANNEL_LAYOUT_4_0:
return SPEAKERS_4POINT0; /**< Channels: FL, FR, FC, RC */
case CEF_CHANNEL_LAYOUT_4_1:
case CEF_CHANNEL_LAYOUT_5_0:
case CEF_CHANNEL_LAYOUT_5_0_BACK:
return SPEAKERS_4POINT1; /**< Channels: FL, FR, FC, LFE, RC */
case CEF_CHANNEL_LAYOUT_5_1:
case CEF_CHANNEL_LAYOUT_5_1_BACK:
Expand Down

0 comments on commit ea9f59d

Please sign in to comment.