mirror of
https://github.com/alsa-project/alsa-tools.git
synced 2026-02-09 10:07:26 -05:00
Added ac3dec 0.6.1 with native ALSA driver.
This commit is contained in:
parent
f2d80b5b5d
commit
28ff64db0a
50 changed files with 6094 additions and 0 deletions
17
ac3dec/plot_spectrum.m
Normal file
17
ac3dec/plot_spectrum.m
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
|
||||
window_size = 2048;
|
||||
f = 0:48000/window_size:48000 * (1 - 1/window_size);
|
||||
w = transpose(hamming(1536));
|
||||
n = size(foo,1);
|
||||
|
||||
spectrum = zeros(1,window_size);
|
||||
|
||||
for i = [1:n]
|
||||
data = w .* foo(i,:);
|
||||
spectrum = spectrum + abs(fft(data,window_size));
|
||||
end
|
||||
|
||||
plot(f,10*log10(spectrum/max(spectrum)));
|
||||
grid;
|
||||
axis([0 24000 -40 0]);
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue