summaryrefslogtreecommitdiff
path: root/dom/media/platforms/agnostic/VorbisDecoder.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'dom/media/platforms/agnostic/VorbisDecoder.cpp')
-rw-r--r--dom/media/platforms/agnostic/VorbisDecoder.cpp59
1 files changed, 14 insertions, 45 deletions
diff --git a/dom/media/platforms/agnostic/VorbisDecoder.cpp b/dom/media/platforms/agnostic/VorbisDecoder.cpp
index f842e64905..ed8b90dbd4 100644
--- a/dom/media/platforms/agnostic/VorbisDecoder.cpp
+++ b/dom/media/platforms/agnostic/VorbisDecoder.cpp
@@ -302,78 +302,47 @@ VorbisDataDecoder::VorbisLayout(uint32_t aChannels)
switch (aChannels) {
case 1: // the stream is monophonic
{
- static const Channel config[] = { AudioConfig::CHANNEL_FRONT_CENTER };
+ static const Channel config[] = { AudioConfig::CHANNEL_MONO };
return config;
}
case 2: // the stream is stereo. channel order: left, right
{
- static const Channel config[] = { AudioConfig::CHANNEL_FRONT_LEFT,
- AudioConfig::CHANNEL_FRONT_RIGHT };
+ static const Channel config[] = { AudioConfig::CHANNEL_LEFT, AudioConfig::CHANNEL_RIGHT };
return config;
}
- case 3: // the stream is a 1d-surround encoding. channel order: left,
- // center, right
+ case 3: // the stream is a 1d-surround encoding. channel order: left, center, right
{
- static const Channel config[] = { AudioConfig::CHANNEL_FRONT_LEFT,
- AudioConfig::CHANNEL_FRONT_CENTER,
- AudioConfig::CHANNEL_FRONT_RIGHT };
+ static const Channel config[] = { AudioConfig::CHANNEL_LEFT, AudioConfig::CHANNEL_CENTER, AudioConfig::CHANNEL_RIGHT };
return config;
}
- case 4: // the stream is quadraphonic surround. channel order: front left,
- // front right, rear left, rear right
+ case 4: // the stream is quadraphonic surround. channel order: front left, front right, rear left, rear right
{
- static const Channel config[] = { AudioConfig::CHANNEL_FRONT_LEFT,
- AudioConfig::CHANNEL_FRONT_RIGHT,
- AudioConfig::CHANNEL_BACK_LEFT,
- AudioConfig::CHANNEL_BACK_RIGHT };
+ static const Channel config[] = { AudioConfig::CHANNEL_LEFT, AudioConfig::CHANNEL_RIGHT, AudioConfig::CHANNEL_LS, AudioConfig::CHANNEL_RS };
return config;
}
- case 5: // the stream is five-channel surround. channel order: front left,
- // center, front right, rear left, rear right
+ case 5: // the stream is five-channel surround. channel order: front left, center, front right, rear left, rear right
{
- static const Channel config[] = { AudioConfig::CHANNEL_FRONT_LEFT,
- AudioConfig::CHANNEL_FRONT_CENTER,
- AudioConfig::CHANNEL_FRONT_RIGHT,
- AudioConfig::CHANNEL_BACK_LEFT,
- AudioConfig::CHANNEL_BACK_RIGHT };
+ static const Channel config[] = { AudioConfig::CHANNEL_LEFT, AudioConfig::CHANNEL_CENTER, AudioConfig::CHANNEL_RIGHT, AudioConfig::CHANNEL_LS, AudioConfig::CHANNEL_RS };
return config;
}
- case 6: // the stream is 5.1 surround. channel order: front left, center,
- // front right, rear left, rear right, LFE
+ case 6: // the stream is 5.1 surround. channel order: front left, center, front right, rear left, rear right, LFE
{
- static const Channel config[] = {
- AudioConfig::CHANNEL_FRONT_LEFT, AudioConfig::CHANNEL_FRONT_CENTER,
- AudioConfig::CHANNEL_FRONT_RIGHT, AudioConfig::CHANNEL_BACK_LEFT,
- AudioConfig::CHANNEL_BACK_RIGHT, AudioConfig::CHANNEL_LFE
- };
+ static const Channel config[] = { AudioConfig::CHANNEL_LEFT, AudioConfig::CHANNEL_CENTER, AudioConfig::CHANNEL_RIGHT, AudioConfig::CHANNEL_LS, AudioConfig::CHANNEL_RS, AudioConfig::CHANNEL_LFE };
return config;
}
- case 7: // surround. channel order: front left, center, front right, side
- // left, side right, rear center, LFE
+ case 7: // surround. channel order: front left, center, front right, side left, side right, rear center, LFE
{
- static const Channel config[] = {
- AudioConfig::CHANNEL_FRONT_LEFT, AudioConfig::CHANNEL_FRONT_CENTER,
- AudioConfig::CHANNEL_FRONT_RIGHT, AudioConfig::CHANNEL_SIDE_LEFT,
- AudioConfig::CHANNEL_SIDE_RIGHT, AudioConfig::CHANNEL_BACK_CENTER,
- AudioConfig::CHANNEL_LFE
- };
+ static const Channel config[] = { AudioConfig::CHANNEL_LEFT, AudioConfig::CHANNEL_CENTER, AudioConfig::CHANNEL_RIGHT, AudioConfig::CHANNEL_LS, AudioConfig::CHANNEL_RS, AudioConfig::CHANNEL_RCENTER, AudioConfig::CHANNEL_LFE };
return config;
}
- case 8: // the stream is 7.1 surround. channel order: front left, center,
- // front right, side left, side right, rear left, rear right, LFE
+ case 8: // the stream is 7.1 surround. channel order: front left, center, front right, side left, side right, rear left, rear right, LFE
{
- static const Channel config[] = {
- AudioConfig::CHANNEL_FRONT_LEFT, AudioConfig::CHANNEL_FRONT_CENTER,
- AudioConfig::CHANNEL_FRONT_RIGHT, AudioConfig::CHANNEL_SIDE_LEFT,
- AudioConfig::CHANNEL_SIDE_RIGHT, AudioConfig::CHANNEL_BACK_LEFT,
- AudioConfig::CHANNEL_BACK_RIGHT, AudioConfig::CHANNEL_LFE
- };
+ static const Channel config[] = { AudioConfig::CHANNEL_LEFT, AudioConfig::CHANNEL_CENTER, AudioConfig::CHANNEL_RIGHT, AudioConfig::CHANNEL_LS, AudioConfig::CHANNEL_RS, AudioConfig::CHANNEL_RLS, AudioConfig::CHANNEL_RRS, AudioConfig::CHANNEL_LFE };
return config;
}
default:
return nullptr;
}
-
}
} // namespace mozilla