Support Dolby-style WAV back surround names when guessing mappings (#2427).
authorCarl Hetherington <cth@carlh.net>
Wed, 18 Jan 2023 16:05:37 +0000 (17:05 +0100)
committerCarl Hetherington <cth@carlh.net>
Wed, 18 Jan 2023 16:05:37 +0000 (17:05 +0100)
src/lib/audio_mapping.cc
test/audio_mapping_test.cc

index cd5c1fc7e58cc6fdba1b7a3a5984d8144d88bf63..ca2425862e733dc68acc9a08312f904580d78b99 100644 (file)
@@ -107,9 +107,11 @@ AudioMapping::make_default (AudioProcessor const * processor, optional<boost::fi
                ChannelRegex(".*[\\._-]LFE[\\._-].*", 3),
                ChannelRegex(".*[\\._-]Lss[\\._-].*", 4),
                ChannelRegex(".*[\\._-]Lsr[\\._-].*", 6),
+               ChannelRegex(".*[\\._-]Lrs[\\._-].*", 6),
                ChannelRegex(".*[\\._-]Ls[\\._-].*", 4),
                ChannelRegex(".*[\\._-]Rss[\\._-].*", 5),
                ChannelRegex(".*[\\._-]Rsr[\\._-].*", 7),
+               ChannelRegex(".*[\\._-]Rrs[\\._-].*", 7),
                ChannelRegex(".*[\\._-]Rs[\\._-].*", 5),
        };
 
index 4e1042759f29ad5a3261c8d0124a74bbdd87d704..37f3d24764abed4c5cc34cc9fcdf516a56ead952 100644 (file)
@@ -97,6 +97,10 @@ BOOST_AUTO_TEST_CASE (audio_mapping_guess_test)
 
        /* Only the filename should be taken into account */
        guess_check ("-Lfe-/foo_L.wav", 0);
+
+       /* Dolby-style */
+       guess_check ("jake-Lrs-good.wav", 6);
+       guess_check ("elwood-Rrs-good.wav", 7);
 }