comparison scripts/audio/@audiorecorder/getplayer.m @ 19522:ee3ec3f02358

maint: moved @audiorecorder and @audioplayer folders inside the audio folder
author Vytautas Jančauskas <unaudio@gmail.com>
date Wed, 18 Sep 2013 00:16:28 +0300
parents scripts/@audiorecorder/getplayer.m@e1f98e402a7e
children 8bb399569393
comparison
equal deleted inserted replaced
19521:480407a8d226 19522:ee3ec3f02358
1 ## -*- texinfo -*-
2 ## @deftypefn{Function File} getplayer (@var{recorderObj})
3 ## Returns an audioplayer object with data recorded by the recorder.
4 ## @end deftypefn
5
6 function player = getplayer(varargin)
7 if (nargin < 1 || nargin > 2)
8 print_usage ();
9 endif
10 recorder = varargin{1};
11 data = getaudiodata(recorder);
12 player = audioplayer(data, get(recorder, 'SampleRate'), get(recorder, 'BitsPerSample'));
13 endfunction