]> git.sesse.net Git - casparcg/commitdiff
Fixed problem in audio_mixer where a default constructed channel_layout was used...
authorHelge Norberg <helge.norberg@gmail.com>
Wed, 29 May 2013 07:53:25 +0000 (09:53 +0200)
committerHelge Norberg <helge.norberg@gmail.com>
Wed, 29 May 2013 07:53:25 +0000 (09:53 +0200)
core/mixer/audio/audio_mixer.cpp
core/mixer/audio/audio_util.cpp
core/mixer/audio/audio_util.h

index 7ebd70735a09ba29961583f8d133f27cb23b3b62..7a932f3072b674f74c4521574fd3541ca139baff 100644 (file)
@@ -81,6 +81,7 @@ public:
        implementation(const safe_ptr<diagnostics::graph>& graph)\r
                : graph_(graph)\r
                , format_desc_(video_format_desc::get(video_format::invalid))\r
+               , channel_layout_(default_channel_layout_repository().get_by_name(L"STEREO"))\r
                , master_volume_(1.0f)\r
                , previous_master_volume_(master_volume_)\r
        {\r
index 36fb4fe844aafa2d2be77eb8762faeb703d6be5b..59b80928f8cecca26f11f6db22f0e97e95c933d8 100644 (file)
 
 namespace caspar { namespace core {
 
+channel_layout::channel_layout()
+       : num_channels(0)
+{
+}
+
 bool channel_layout::operator==(const channel_layout& other) const
 {
        return channel_names == other.channel_names
@@ -60,6 +65,11 @@ bool channel_layout::no_channel_names() const
        return channel_names.empty();
 }
 
+mix_config::mix_config()
+       : strategy(add)
+{
+}
+
 bool needs_rearranging(
                const channel_layout& source, const channel_layout& destination)
 {
index 4451a419debbd5975099443e7e5ef0e60943f39e..bdfb7fca73b505c831fcde4b3ec2cf0af5b12c62 100644 (file)
@@ -85,6 +85,7 @@ struct channel_layout
        std::vector<std::wstring> channel_names;\r
        int num_channels;\r
 \r
+       channel_layout();\r
        bool operator==(const channel_layout& other) const;\r
        int channel_index(const std::wstring& channel_name) const;\r
        bool has_channel(const std::wstring& channel_name) const;\r
@@ -234,6 +235,8 @@ struct mix_config
        std::wstring to_layout_type;\r
        std::multimap<std::wstring, destination> destination_ch_by_source_ch;\r
        mix_strategy strategy;\r
+\r
+       mix_config();\r
 };\r
 \r
 bool needs_rearranging(\r