[ba1662]: blockproc / blockdevices.m  Maximize  Restore  History

Download this file

38 lines (30 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
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
function devs = blockdevices()
%BLOCKDEVICES Lists audio devices
% Usage: devs = blockdevices();
%
% `blockdevices` lists the available audio input and output devices. The
% ID can be used in the |block| function to specify which device should
% be used.
%
% See also: block
devs = playrec('getDevices');
fprintf('\nAvailable output devices:\n');
for k=1:length(devs)
if(devs(k).outputChans)
fprintf('ID =%2d: %s (%s) %d channels, default latency %d--%d ms\n', ...
devs(k).deviceID, devs(k).name, ...
devs(k).hostAPI, devs(k).outputChans,...
floor(1000*devs(k).defaultLowOutputLatency),...
floor(1000*devs(k).defaultHighOutputLatency));
end
end
fprintf('\nAvailable input devices:\n');
for k=1:length(devs)
if(devs(k).inputChans)
fprintf('ID =%2d: %s (%s) %d channels, default latency %d--%d ms\n', ...
devs(k).deviceID, devs(k).name, ...
devs(k).hostAPI, devs(k).inputChans,...
floor(1000*devs(k).defaultLowInputLatency),...
floor(1000*devs(k).defaultHighInputLatency));
end
end

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.





No, thanks