[164e09]: comp / demo_blockproc_header.m Maximize Restore History

Download this file

demo_blockproc_header.m    22 lines (21 with data), 1.1 kB

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
function failed=demo_blockproc_header(demo_name,demo_nargin)
failed = 0;
if demo_nargin<1
fprintf(['\n%s:\nTo run the demo, use one of the following:\n\n',...
'%s(''gspi.wav'') to play gspi.wav (any wav file will do).\n',...
'%s(''dialog'') to choose the wav file via file chooser dialog GUI.\n',...
'%s(f,''fs'',fs) to play from a column vector f using sampling frequency fs.\n',...
'%s(''playrec'') to record from a mic and play simultaneously.\n\n',...
'Avalable input and output devices can be listed by |blockdevices|.\n',...
'Particular device can be chosen by passing additional key-value pair ''devid'',devid.\n',...
'Output channels of the device cen be selected by additional key-value pair ''playch'',[ch1,ch2].\n',...
'Input channels of the device cen be selected by additional key-value pair ''recch'',[ch1].\n\n',...
]...
,upper(demo_name),demo_name,demo_name,demo_name,demo_name);
failed=1;
end
try
playrec('isInitialised');
catch
error('%s: playrec or portaudio are not properly compiled. ',demo_name);
end