function LoopSound(y,fs,n)

% function LoopSound(y,fs,n)
% Simply loops the wave y which is sampled at fs for n times

%  Author: Andreas Floros
%  Digital Audio Processing Applications Group
%  Dept. of Audiovisual Arts, Ionian University
%  v.1.0 - Last Modified: 22/03/2009.

% Initiate local variable
SoundDataToLoop	= []; 

for i = 1 : n
    SoundDataToLoop = [SoundDataToLoop ; y]; 
end;

% Now play the sound
sound(SoundDataToLoop,fs);
