From 27a3f2837a28862fa9fab7714a96975dc8540ac9 Mon Sep 17 00:00:00 2001 From: Nils Philippsen Date: Tue, 10 Dec 2013 16:50:35 +0100 Subject: use std::fill_n to fill gain buffer with samples Using memset fills the buffer with whatever 1.0 as a double or float has in its LSB. --- libs/ardour/export_channel.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'libs/ardour/export_channel.cc') diff --git a/libs/ardour/export_channel.cc b/libs/ardour/export_channel.cc index 82e5d80244..c67f33bb91 100644 --- a/libs/ardour/export_channel.cc +++ b/libs/ardour/export_channel.cc @@ -131,7 +131,7 @@ RegionExportChannelFactory::RegionExportChannelFactory (Session * session, Audio mixdown_buffer.reset (new Sample [frames_per_cycle]); gain_buffer.reset (new Sample [frames_per_cycle]); - memset (gain_buffer.get(), 1.0, sizeof (Sample) * frames_per_cycle); + std::fill_n (gain_buffer.get(), frames_per_cycle, Sample (1.0)); break; case Processed: -- cgit v1.2.3