You've already forked libopenshot
mirror of
https://github.com/OpenShot/libopenshot.git
synced 2026-03-02 08:53:52 -08:00
Restore default gain when adding audio
Incorrect conversion of float to int16_t caused distortion that was mistakenly perceived as clipping. Now because the convertion was fixed, there is no more sense to reduce input gain of the source.
This commit is contained in:
@@ -1627,9 +1627,8 @@ void FFmpegReader::ProcessAudioPacket(int64_t requested_frame, int64_t target_fr
|
||||
else
|
||||
partial_frame = true;
|
||||
|
||||
// Add samples for current channel to the frame. Reduce the volume to 98%, to prevent
|
||||
// some louder samples from maxing out at 1.0 (not sure why this happens)
|
||||
f->AddAudio(true, channel_filter, start, iterate_channel_buffer, samples, 0.98f);
|
||||
// Add samples for current channel to the frame.
|
||||
f->AddAudio(true, channel_filter, start, iterate_channel_buffer, samples, 1.0f);
|
||||
|
||||
// Debug output
|
||||
ZmqLogger::Instance()->AppendDebugMethod("FFmpegReader::ProcessAudioPacket (f->AddAudio)", "frame", starting_frame_number, "start", start, "samples", samples, "channel", channel_filter, "partial_frame", partial_frame, "samples_per_frame", samples_per_frame);
|
||||
|
||||
Reference in New Issue
Block a user