Commit bf1c67fb authored by Jan-Gerrit Richter's avatar Jan-Gerrit Richter
Browse files

added core audio format to ita_read

parent 7987fe99
function result = ita_read_caf(filename,varargin)
%ITA_READ_FLAC - Read Free Lossless Audio Codec Files
% This function is completely based on the MATLAB audioread.
% It returns a itaAudio object containing the files data and metadata.
% See also ita_read, ita_write, audioread.
% <ITA-Toolbox>
% This file is part of the ITA-Toolbox. Some rights reserved.
% You can find the license for this m-file in the license.txt file in the ITA-Toolbox folder.
% </ITA-Toolbox>
%% Return type of data this function can read
if nargin == 0
result{1}.extension = '.caf';
result{1}.comment = 'Core Audio Format Files (*.caf)';
if ~exist(filename,'file')
error('ITA_READ_CAF: File does not exist');
[data,fs] = audioread(filename);
result = itaAudio;
result.samplingRate = fs;
result.timeData = data;
error('ITA_READ_CAF: Something went wrong');
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment