dawn@0: function [x, fs, frameLength, noOfFrames] = openFile( currentSampleName ) dawn@0: dawn@0: [ x, fs ] = wavread(['../' currentSampleName]); dawn@0: frameLength = 2^(ceil(log2(fs/100))); dawn@0: noOfFrames = floor( length(x) / frameLength); %skip the final samples if necessary dawn@0: dawn@0: % Convert stereo to mono dawn@0: if (size(x, 2)==2) dawn@0: x = mean(x')'; dawn@0: end