From 8a805b6ba14b5365fcc93a46460b397190cd389e Mon Sep 17 00:00:00 2001
From: Thomas Harte <thomas.harte@gmail.com>
Date: Sat, 21 Nov 2020 22:52:57 -0500
Subject: [PATCH] Ensures that get_average_output_peak() returns something
 sensible even before a set_relative_volumes.

---
 Outputs/Speaker/Implementation/CompoundSource.hpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Outputs/Speaker/Implementation/CompoundSource.hpp b/Outputs/Speaker/Implementation/CompoundSource.hpp
index 01f39f68f..a236d6aa1 100644
--- a/Outputs/Speaker/Implementation/CompoundSource.hpp
+++ b/Outputs/Speaker/Implementation/CompoundSource.hpp
@@ -171,7 +171,7 @@ template <typename... T> class CompoundSource:
 		CompoundSourceHolder<T...> source_holder_;
 		std::vector<double> volumes_;
 		int16_t volume_range_ = 0;
-		std::atomic<double> average_output_peak_;
+		std::atomic<double> average_output_peak_{1.0};
 };
 
 }