view 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
line wrap: on
line source
function [x, fs, frameLength, noOfFrames] = openFile( currentSampleName )
    
    [ x, fs ] =  wavread(['../' currentSampleName]);
    frameLength = 2^(ceil(log2(fs/100)));
    noOfFrames = floor( length(x) / frameLength); %skip the final samples if necessary

    % Convert stereo to mono
    if (size(x, 2)==2)
        x = mean(x')';
    end