Mercurial > octave-nkf
comparison scripts/audio/@audioplayer/audioplayer.m @ 19605:72304a4e010a
Use Octave coding conventions for documentation of audio functions.
* audio.txi, audioread.cc, @audioplayer/audioplayer.m, @audioplayer/get.m,
@audioplayer/play.m, @audioplayer/playblocking.m, @audioplayer/set.m,
@audiorecorder/audiorecorder.m, @audiorecorder/get.m,
@audiorecorder/getaudiodata.m, @audiorecorder/play.m, @audiorecorder/record.m,
@audiorecorder/set.m:
Use Octave documentation standards.
* audiodevinfo.cc: Limit lines to 80 chars. Indent according to GNU style.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 13 Jan 2015 08:54:25 -0800 |
parents | e75df9e43e63 |
children | b2fe4dbe5266 |
comparison
equal
deleted
inserted
replaced
19604:62ca016dbb2a | 19605:72304a4e010a |
---|---|
15 ## You should have received a copy of the GNU General Public License | 15 ## You should have received a copy of the GNU General Public License |
16 ## along with Octave; see the file COPYING. If not, see | 16 ## along with Octave; see the file COPYING. If not, see |
17 ## <http://www.gnu.org/licenses/>. | 17 ## <http://www.gnu.org/licenses/>. |
18 | 18 |
19 ## -*- texinfo -*- | 19 ## -*- texinfo -*- |
20 ## @deftypefn {Function File} {@var{player} =} audioplayer (@var{y}, @var{fs}) | 20 ## @deftypefn {Function File} {@var{player} =} audioplayer (@var{y}, @var{fs}) |
21 ## @deftypefnx {Function File} {@var{player} =} audioplayer (@var{y}, @var{fs}, @var{nbits}) | 21 ## @deftypefnx {Function File} {@var{player} =} audioplayer (@var{y}, @var{fs}, @var{nbits}) |
22 ## @deftypefnx {Function File} {@var{player} =} audioplayer (@var{y}, @var{fs}, @var{nbits}, @var{id}) | 22 ## @deftypefnx {Function File} {@var{player} =} audioplayer (@var{y}, @var{fs}, @var{nbits}, @var{id}) |
23 ## @deftypefnx {Function File} {@var{player} =} audioplayer (@var{recorder}) | 23 ## @deftypefnx {Function File} {@var{player} =} audioplayer (@var{recorder}) |
24 ## @deftypefnx {Function File} {@var{player} =} audioplayer (@var{recorder}, @var{id}) | 24 ## @deftypefnx {Function File} {@var{player} =} audioplayer (@var{recorder}, @var{id}) |
25 ## Create an audioplayer object that will play back data @var{y} at sample | 25 ## Create an audioplayer object that will play back data @var{y} at sample |
26 ## rate @var{fs}. The optional arguments @var{nbits}, and @var{id} | 26 ## rate @var{fs}. The optional arguments @var{nbits}, and @var{id} |
27 ## specify the bit depth and player device id, respectively. Device IDs | 27 ## specify the bit depth and player device id, respectively. Device IDs |
28 ## may be found using the audiodevinfo function. | 28 ## may be found using the audiodevinfo function. |
29 ## Given an audioplayer object, use the data from the object to | 29 ## Given an audioplayer object, use the data from the object to |
30 ## initialize the player. | 30 ## initialize the player. |
31 ## @end deftypefn | 31 ## |
32 ## | 32 ## The signal @var{y} can be a vector or a two-dimensional array. |
33 ## The signal @var{y} can be a vector or a two dimensional array. | |
34 ## | 33 ## |
35 ## The following example will create an audioplayer object that will play | 34 ## The following example will create an audioplayer object that will play |
36 ## back one second of white noise at 44100 sample rate using 8 bits per | 35 ## back one second of white noise at 44100 sample rate using 8 bits per |
37 ## sample. | 36 ## sample. |
38 ## | 37 ## |
41 ## y = randn (2, 44100) - 0.5; | 40 ## y = randn (2, 44100) - 0.5; |
42 ## player = audioplayer (y, 44100, 8); | 41 ## player = audioplayer (y, 44100, 8); |
43 ## play (player); | 42 ## play (player); |
44 ## @end group | 43 ## @end group |
45 ## @end example | 44 ## @end example |
45 ## @end deftypefn | |
46 | 46 |
47 ## FIXME: callbacks don't work properly, apparently because portaudio | 47 ## FIXME: callbacks don't work properly, apparently because portaudio |
48 ## will execute the callbacks in a separate thread, and calling Octave | 48 ## will execute the callbacks in a separate thread, and calling Octave |
49 ## functions in a separate thread which is likely to cause trouble with | 49 ## functions in a separate thread which is likely to cause trouble with |
50 ## all of Octave's global data... | 50 ## all of Octave's global data... |