%----------- B-format dekoder (Semestralni prace) -------------------------
%............stereoUHJ......................
% 31.10.2008
% verze 1 
%--------------------------------------------------------------------------
function [L,R] = stereoUHJ(SUMA,DELTA)

    L = (SUMA + DELTA)/2;
    R = (SUMA - DELTA)/2;

disp('reproduktory jsou v pořadí: L R')
disp('(L - left,R - right)')

%  zapis na disk   
% mkdir('c:\Dekoder-vystupy','stereoUHJ');
% 
%         speaker = L;
%         text='c:\Dekoder-vystupy\stereoUHJ\speakerL';
%         wavwrite(0.999*(speaker/max(abs(speaker))),48000,text);
%         
%         speaker = R;
%         text='c:\Dekoder-vystupy\stereoUHJ\speakerR';
%         wavwrite(0.999*(speaker/max(abs(speaker))),48000,text);
    
    disp('Konverze B-formatu do formatu STEREO')