You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the interest of ensuring that this since-deleted logic isn't overlooked when we write tests in relation to audio file processing, I'm hereby citing the relevant business rules:
// These toggles default to true, but may be changed hereafter, depending// on the totality of the inputs supplied.$performTrim = true;
$canFadeIn = true;
$canFadeOut = true;
// Determine whether or not the audio file is actually shorter than// the specified clip length. This is done to prevent the resultant// file from being padded with silence.if ($fileDetails['playtime_seconds'] < $clipLength) {
// No trim or fades are necessary if the play-time// is less than the specified clip length.$performTrim = false;
$canFadeIn = false;
$canFadeOut = false;
}
// This block prevents problems from a track preview start// time that is too far into the track to allow for a preview clip of// the specified length.if (($fileDetails['playtime_seconds'] - $trimStartTime) < $clipLength) {
// We'll force the track preview to start exactly $clipLength seconds// before the end of the track, thus forcing a $clipLength-second preview// clip length.$trimStartTime = $fileDetails['playtime_seconds'] - $clipLength;
}
// Convert the clip length from seconds to hh:mm:ss format.$clipLength = Utility::sec2hms($clipLength, false, false);
if ($performTrim !== false) {
$cmd[] = ' trim ' . escapeshellarg($trimStartTime) . '' . escapeshellarg($clipLength);
}
if ($canFadeIn !== false || $canFadeOut !== false) {
$cmd[] = ' fade q ';
if ($canFadeIn === false) {
// Setting a fade-in length of zero in SoX is the// same as having no fade-in at all.$fadeInLength = '0';
}
$cmd[] = escapeshellarg($fadeInLength);
if ($canFadeOut !== false) {
$cmd[] = '' . escapeshellarg($clipLength) . '' . escapeshellarg($fadeOutLength);
}
}
The text was updated successfully, but these errors were encountered:
Some type of Laravel-specific bridge package would probably be ideal. I'll have to dig into it a bit deeper and see what the integration might look like. I'll post an update on this soon.
In the interest of ensuring that this since-deleted logic isn't overlooked when we write tests in relation to audio file processing, I'm hereby citing the relevant business rules:
https://github.com/indiehd/audio-manipulator/blob/7fc5d3ff29d46b2e5f3fe9b987f08614b1b6fe88/src/Flac/FlacConverter.php#L77-L113
and
https://github.com/indiehd/audio-manipulator/blob/7fc5d3ff29d46b2e5f3fe9b987f08614b1b6fe88/src/Flac/FlacConverter.php#L139-L160
The text was updated successfully, but these errors were encountered: