% test loudness.m

testfolder = '/Users/Brecht/Google Drive/Writings/ebur128-scripts/ebu-loudness-test-setv04/';

files = dir([testfolder '*.wav']);

tTotal = tic;
for file = files'
    [signal, fs] = audioread([testfolder file.name]);
    tic;
    IL = loudness(signal,fs); % calculate integrated loudness
    tCurrent = toc;
    fprintf('%s:\t%4.10f\t%d\t(%4.2f s)\n', file.name, IL, fs, tCurrent);
end
fprintf('Testing completed: %4.2f seconds elapsed\n', toc(tTotal));