annotate Code/General/openFile.m @ 4:92ca03a8fa99 tip

Update to ICASSP 2013 benchmark
author Dawn Black
date Wed, 13 Feb 2013 11:02:39 +0000
parents ea0c737c6323
children
rev   line source
dawn@0 1 function [x, fs, frameLength, noOfFrames] = openFile( currentSampleName )
dawn@0 2
dawn@0 3 [ x, fs ] = wavread(['../' currentSampleName]);
dawn@0 4 frameLength = 2^(ceil(log2(fs/100)));
dawn@0 5 noOfFrames = floor( length(x) / frameLength); %skip the final samples if necessary
dawn@0 6
dawn@0 7 % Convert stereo to mono
dawn@0 8 if (size(x, 2)==2)
dawn@0 9 x = mean(x')';
dawn@0 10 end