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
@ -22,6 +22,9 @@ function output = fade_in(input, time)
|
|||||||
% fade in effect: from no volume to full volume of signal
|
% fade in effect: from no volume to full volume of signal
|
||||||
multiplier = (1 : time) / time;
|
multiplier = (1 : time) / time;
|
||||||
|
|
||||||
|
while length(multiplier) < len
|
||||||
|
multiplier = [multiplier 1];
|
||||||
|
end
|
||||||
% the resulting fade-in output
|
% the resulting fade-in output
|
||||||
output = input .* multiplier;
|
output = input .* multiplier;
|
||||||
end
|
end
|
||||||
|
@ -24,6 +24,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;
|
||||||
end
|
end
|
||||||
|
Reference in New Issue
Block a user