Skip to content

Commit

Permalink
Fix tempo speed to be always greater than 1.0
Browse files Browse the repository at this point in the history
  • Loading branch information
anuj9196 authored Nov 12, 2018
1 parent 20b49d8 commit 75ae6ff
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/MusicCombine.php
Original file line number Diff line number Diff line change
Expand Up @@ -223,17 +223,17 @@ private function _getAudioSpeed($time_gap, $audio_duration)
}

if ($number_of_seconds_to_append > 0) {
if ($number_of_seconds_to_append >= 0.5) {
if ($number_of_seconds_to_append >= 1) {
$tempo .= 'atempo='.$number_of_seconds_to_append;
} else {
$tempo .= 'atempo=0.5';
$tempo .= 'atempo=1.0';
}
} else {
$tempo = rtrim($tempo, ',');
}
} else {
if ($speed_required < 0.5) {
$tempo .= 'atempo=0.5';
if ($speed_required < 1) {
$tempo .= 'atempo=1.0';
} else {
$tempo .= 'atempo=' . $speed_required;
}
Expand Down

0 comments on commit 75ae6ff

Please sign in to comment.