Mercurial > octave-nkf
view scripts/audio/@audiorecorder/play.m @ 19531:77b52b86b419
change @audiorecorder method docstrings to work with new texinfo
* audiorecorder.m, get.m, getaudiodata.m, play.m, record.m, set.m: change
stand-alone deftypefnx tags to deftypefn tags
author | Vytautas Jančauskas <unaudio@gmail.com> |
---|---|
date | Fri, 20 Sep 2013 00:51:21 +0300 |
parents | ee3ec3f02358 |
children | 8bb399569393 |
line wrap: on
line source
## -*- texinfo -*- ## @deftypefn{Function File} player = play (@var{recorderObj}) ## Play the audio recorded in @var{recorderObj} and return a corresponding audioplayer object. ## @end deftypefn ## @deftypefn{Function File} player = play (@var{recorderObj}, start) ## Play the audio recorded in @var{recorderObj} starting from @var{start} seconds in to the recording. Returns a corresponding audioplayer object. ## @end deftypefn ## @deftypefn{Function File} player = play (@var{recorderObj}, [start, end]) ## Play the audio recorded in @var{recorderObj} starting from @var{start} seconds and ending at @var{end} seconds in the recording. Returns a corresponding audioplayer object. ## @end deftypefn function player = play(varargin) if (nargin < 1 || nargin > 2) print_usage (); endif recorder = varargin{1}; data = getaudiodata(recorder); player = audioplayer(data, get(recorder, 'SampleRate'), get(recorder, 'BitsPerSample')); if (nargin == 1) play(player); else play(player, varargin{2}); endif endfunction