Aufgrund einer Wartung wird GitLab am 26.10. zwischen 8:00 und 9:00 Uhr kurzzeitig nicht zur Verfügung stehen. / Due to maintenance, GitLab will be temporarily unavailable on 26.10. between 8:00 and 9:00 am.

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

added ita_read_flac

matlabs audioread can do it.
matlab 2012b
parent cacce6ed
function result = ita_read_flac(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 = '.flac';
result{1}.comment = 'FLAC Files (*.flac)';
if ~exist(filename,'file')
error('ITA_READ_FLAC: File does not exist');
[data,fs] = audioread(filename);
result = itaAudio;
result.samplingRate = fs;
result.timeData = data;
error('ITA_READ_FLAC: Something went wrong');
Markdown is supported
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