Fixed fade_out.m

Fixed the error of dimensions not matching in the operation input .* multiplier
This commit is contained in:
SeaSponge 2021-12-09 18:58:31 -08:00 committed by GitHub
parent ecf6ec01ea
commit 0c39f41ce8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -23,6 +23,10 @@ function output = fade_out(input, time)
% fade out effect: from full volume of signal to no volume % fade out effect: from full volume of signal to no volume
multiplier = flip(multiplier) multiplier = flip(multiplier)
while length(multiplier) < len
multiplier = [multiplier 0];
end
% the resulting fade-in output % the resulting fade-in output
output = input .* multiplier; output = input .* multiplier;