Merge pull request #40 from ltcptgeneral/Squidwarder-patch-1
Squidwarder patch 1 (Fixed both fade_in.m and fade_out.m)
This commit is contained in:
commit
90e03cb118
@ -21,7 +21,10 @@ function output = fade_in(input, time)
|
||||
% set multiplier as 1D array
|
||||
% fade in effect: from no volume to full volume of signal
|
||||
multiplier = (1 : time) / time;
|
||||
|
||||
|
||||
while length(multiplier) < len
|
||||
multiplier = [multiplier 1];
|
||||
end
|
||||
% the resulting fade-in output
|
||||
output = input .* multiplier;
|
||||
end
|
||||
|
@ -23,6 +23,10 @@ function output = fade_out(input, time)
|
||||
|
||||
% fade out effect: from full volume of signal to no volume
|
||||
multiplier = flip(multiplier)
|
||||
|
||||
while length(multiplier) < len
|
||||
multiplier = [multiplier 0];
|
||||
end
|
||||
|
||||
% the resulting fade-in output
|
||||
output = input .* multiplier;
|
||||
|
Reference in New Issue
Block a user