%\| Summer Semester 2014
%\| AudioLabs Lab Course
%===============================
%\| MODULE: Speech enhancement 
%\| Prof. Dr.-Ing Emanuel Habets
%\| Module supervsors: 
%\|     - Soumitro Chakrabarty
%\|     - Maja Taseska
%===============================
%\| Author:
%\|     - Maja Taseska
%===============================
%===============================

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%=============FUNCTION DESCRIPTION====================

% Input parameters
%-----------------
%\| "Y" ... a matrix of size [numMics x length(frequencies) x number of Frames]
% containing the input mixture signals
%\| "X" ... a matrix of size [numMics x length(frequencies) x number of Frames x 2]
% containing the input clean speech signal spectra
%\| "V" ... a matrix of size [numMics x length(frequencies) x number of Frames]
% containing the noise spectrum at the microphones
%\| "arrayCenter" ... vector [3x1] containing the coordinates of the array
%center
%\| "sourcePos"... vector [3x1] containing the position of the source of
%interest
%\| "numMics" ... number of microphones
%\| "micDist" ... the distance between neighboring microphones
%\| "freqvec" ... vector containing the frequencies at which the steering
%vector should be computed

% Output parameters
%-------------------
%\| "Ydsb" ... a matrix of size [length(frequencies) x number of Frames],
%containing the specrum of the signal obtained after applying a delay and
%sum beamformer to the microphone signals.

%\| "Xdsb" ... a matrix of size [length(frequencies) x number of Frames x 2],
%containing the specra of the signal obtained after applying a delay and
%sum beamformer to the clean speech signals separately. These signals are
%required for the performance evaluation.

%\| "Vdsb" ... a matrix of size [length(frequencies) x number of Frames],
%containing the specrum of the noise signal obtained after applying a delay and
%sum beamformer to the noise at the microphones. These signals are
%required for the performance evaluation.

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%


function [Ydsb,Xdsb, Vdsb] = fcn_applyDSB(Y, X, V, arrcenter, sourcePos,numMics, micDist , freqvec)

%=======================
% FILL IN THE BLANKS
%=======================

% Call the function that was programmed in Exercise 1 to compute the
% desired spectra
steerVec = fcn_compute_steerVec_linArray(arrcenter,sourcePos,numMics,micDist,freqvec);

% Compute the filter
H_dsb = 

% Apply the filter
Ydsb =
Xdsb =  
Vdsb =  
