function audio(par)
if nargin == 0
f = figure;
set(f, 'Units', 'Pixels',...
'Position', [300 250 520 480],...
'NumberTitle', 'off',...
'Name', 'Audio Panel',...
'MenuBar', 'none',...
'Tag', 'figure');
u1 = uicontrol;
set(u1, 'Units', 'Pixels',...
'Style', 'Push',...
'Position', [15 15 70 30],...
'String', 'Start',...
'Tag', 'button1',...
'Callback', 'audio button1');
u2 = uicontrol;
set(u2, 'Units', 'Pixels',...
'Style', 'Push',...
'Position', [150 15 70 30],...
'String', 'Pause',...
'Tag', 'button2',...
'Callback', 'audio button2');
u3 = uicontrol;
set(u3, 'Units', 'Pixels',...
'Style', 'Push',...
'Position', [285 15 70 30],...
'String', 'Graf',...
'Tag', 'button2',...
'Callback', 'audio button3');
u4 = uicontrol;
set(u4, 'Units', 'Pixels',...
'Style', 'Push',...
'Position', [435 15 70 30],...
'String', 'Konec',...
'Tag', 'button2',...
'Callback', 'audio button4');
else
s = audiorecorder(44100, 16, 1);
switch(par)
case('button1')
record(s);
case('button2')
stop(s);
case('button3')
data = getaudiodata(s, 'double');
plot(data);
case('button4')
close all;
end
end