13
0

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.
This commit is contained in:
Nils Philippsen 2013-12-10 16:50:35 +01:00
parent 63f8d282bd
commit 27a3f2837a

View File

@ -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: