mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-11-14 05:18:31 +00:00
git status -u, learn something new every day.
This commit is contained in:
1 parent
59205c7678
commit
68913681a4
106 files changed
+10920
No files matched your search
@@ -0,0 +1,54 @@
|
||||
% cspec.m
|
||||
% David Rowe Aug 2012
|
||||
% Used to compare spectromgrams while experimenting with phase
|
||||
|
||||
function cspec(s1,s2)
|
||||
f1 = fopen(s1,"rb");
|
||||
s1 = fread(f1,Inf,"short");
|
||||
f2 = fopen(s2,"rb");
|
||||
s2 = fread(f2,Inf,"short");
|
||||
|
||||
Fs = 8000;
|
||||
spec_win = 512;
|
||||
|
||||
state = 's1';
|
||||
do
|
||||
if strcmp(state,'s1')
|
||||
spec(s1,Fs,spec_win);
|
||||
%title(s1);
|
||||
end
|
||||
if strcmp(state,'s2')
|
||||
spec(s2,Fs,spec_win);
|
||||
%title(s2);
|
||||
end
|
||||
if strcmp(state,'diff')
|
||||
spec(s1-s2,Fs,spec_win);
|
||||
%title("difference");
|
||||
end
|
||||
|
||||
printf("\rstate: %s space-toggle d-diff q-quit", state);
|
||||
fflush(stdout);
|
||||
k = kbhit();
|
||||
|
||||
if k == ' '
|
||||
if strcmp(state,"diff")
|
||||
next_state = 's1';
|
||||
end
|
||||
if strcmp(state,"s1")
|
||||
next_state = 's2';
|
||||
end
|
||||
if strcmp(state,'s2')
|
||||
next_state = 's1';
|
||||
end
|
||||
end
|
||||
|
||||
if k == 'd'
|
||||
next_state = 'diff';
|
||||
end
|
||||
|
||||
state = next_state;
|
||||
until (k == 'q')
|
||||
|
||||
printf("\n");
|
||||
|
||||
endfunction
|
||||
Reference in new issue
Block a user