view general/fileutils/music_files.m @ 42:ae596261e75f

Various fixes and development to audio handling
author samer
date Tue, 02 Dec 2014 14:51:13 +0000
parents e44f49929e56
children
line wrap: on
line source
% music_files - search for audio files under music directory
%
% music_files :: 
%    string ~'Path based at ~/Music'
%    options {
%       pattern :: string/'*' ~'filename matching patter';
%       rec     :: bool/0     ~'recurse into subdirs?'
%    }
% -> cells {string}.
%
% This function assumes that the HOME environment variable points to the
% user's home directory and that there exists there a directory called 'Music'.

function L=music_files(d,varargin)
	L=listfiles([getenv('HOME'),filesep,'Music',filesep,d],'regexp','.*\.(mp3|ogg|m4a|wav|au|flac)',varargin{:});