diff --git a/Libraries/LibAudio/AWavLoader.cpp b/Libraries/LibAudio/AWavLoader.cpp index 2b28f8c219..93e6a2bd17 100644 --- a/Libraries/LibAudio/AWavLoader.cpp +++ b/Libraries/LibAudio/AWavLoader.cpp @@ -257,5 +257,10 @@ RefPtr ABuffer::from_pcm_data(ByteBuffer& data, int num_channels, int b // don't belong. ASSERT(!stream.handle_read_failure()); + // HACK: This is a total hack to remove an unnecessary sample at the end of the buffer. + // FIXME: Don't generate the extra sample... :^) + for (int i = 0; i < 1; ++i) + fdata.take_last(); + return ABuffer::create_with_samples(move(fdata)); }