Mercurial > octave-nkf
view scripts/@audiorecorder/getplayer.m @ 19510:e1f98e402a7e
New files - @audiorecorder and @audioplayer classes
* @audiorecorder: new files implementing methods for the audiorecorder class
* @audioplayer: new files implementing methods for the audioplayer class
author | Vytautas Jančauskas <unaudio@gmail.com> |
---|---|
date | Wed, 11 Sep 2013 22:40:18 +0300 |
parents | |
children |
line wrap: on
line source
## -*- texinfo -*- ## @deftypefn{Function File} getplayer (@var{recorderObj}) ## Returns an audioplayer object with data recorded by the recorder. ## @end deftypefn function player = getplayer(varargin) if (nargin < 1 || nargin > 2) print_usage (); endif recorder = varargin{1}; data = getaudiodata(recorder); player = audioplayer(data, get(recorder, 'SampleRate'), get(recorder, 'BitsPerSample')); endfunction