Mercurial > octave-nkf
comparison libinterp/dldfcn/audioread.cc @ 19550:fc85d9026bb6
doc fixes for audio functions
* audiodevinfo.cc, audioread.cc: Style fixes for docstrings.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Fri, 02 Jan 2015 11:42:04 -0500 |
parents | 4cb4210bd392 |
children | e616c2830413 |
comparison
equal
deleted
inserted
replaced
19549:0f7788e2d677 | 19550:fc85d9026bb6 |
---|---|
41 #endif | 41 #endif |
42 | 42 |
43 DEFUN_DLD (audioread, args, , | 43 DEFUN_DLD (audioread, args, , |
44 "-*- texinfo -*-\n\ | 44 "-*- texinfo -*-\n\ |
45 @deftypefn {Loadable Function} {[@var{y}, @var{fs}] =} audioread (@var{filename})\n\ | 45 @deftypefn {Loadable Function} {[@var{y}, @var{fs}] =} audioread (@var{filename})\n\ |
46 \n\ | 46 @deftypefnx {Loadable Function} {[@var{y}, @var{fs}] =} audioread (@var{filename}, @var{samples})\n\ |
47 Load an audio file that is specified by @var{filename}. It will be loaded\n\ | 47 \n\ |
48 in to a column matrix with as many rows as there are audio frames and as many\n\ | 48 @deftypefnx {Loadable Function} {[@var{y}, @var{fs}] =} audioread (@var{filename}, @var{datatype})\n\ |
49 columns as there are channels in the file. Sampling rate will be stored in\n\ | 49 @deftypefnx {Loadable Function} {[@var{y}, @var{fs}] =} audioread (@var{filename}, @var{samples}, @var{datatype})\n\ |
50 @var{fs}.\n\ | 50 Read the audio file @var{filename} and return the audio data and sampling\n\ |
51 \n\ | 51 rate. The audio data is stored as matrix with rows corresponding\n\ |
52 @end deftypefn\n\ | 52 to audio frames and columns corresponding to channels.\n\ |
53 @deftypefn {Loadable Function} {[@var{y}, @var{fs}] =} audioread (@var{filename}, @var{samples})\n\ | 53 \n\ |
54 \n\ | 54 The optional two-element vector argument @var{samples} specifies starting\n\ |
55 Read a specified range of samples from a file specified by @var{filename}.\n\ | 55 and ending frames.\n\ |
56 Argument @var{samples} is a vector with two values specifying starting frame\n\ | 56 \n\ |
57 and ending frame.\n\ | 57 The optional argument @var{datatype} specifies the datatype to return.\n\ |
58 \n\ | 58 If it is @qcode{\"native\"}, then the type of data depends on how the\n\ |
59 @end deftypefn\n\ | 59 data is stored in the audio file.\n\ |
60 @deftypefn {Loadable Function} {[@var{y}, @var{fs}] =} audioread (@var{filename}, @var{datatype})\n\ | |
61 \n\ | |
62 Read a file and return an array of specified type. If @var{datatype} is\n\ | |
63 @qcode{\"native\"} then an array of fixed width integer type will be returned\n\ | |
64 depending on how data is stored in the audio file. If @var{datatype} is\n\ | |
65 @qcode{\"double\"} a double matrix will be returned.\n\ | |
66 \n\ | |
67 @end deftypefn\n\ | |
68 @deftypefn {Loadable Function} {[@var{y}, @var{fs}] =} audioread (@var{filename}, @var{samples}, @var{datatype})\n\ | |
69 \n\ | 60 \n\ |
70 Read a file and return a specified range of frames in an array of specified type.\n\ | 61 Read a file and return a specified range of frames in an array of specified type.\n\ |
71 \n\ | 62 \n\ |
72 @end deftypefn" | 63 @end deftypefn") |
73 ) | |
74 { | 64 { |
75 octave_value_list retval; | 65 octave_value_list retval; |
76 #ifdef HAVE_SNDFILE | 66 #ifdef HAVE_SNDFILE |
77 Matrix audio; | 67 Matrix audio; |
78 octave_value ret_audio; | 68 octave_value ret_audio; |
170 #endif | 160 #endif |
171 | 161 |
172 DEFUN_DLD (audiowrite, args, , | 162 DEFUN_DLD (audiowrite, args, , |
173 "-*- texinfo -*-\n\ | 163 "-*- texinfo -*-\n\ |
174 @deftypefn {Loadable Function} {} audiowrite (@var{filename}, @var{y}, @var{fs})\n\ | 164 @deftypefn {Loadable Function} {} audiowrite (@var{filename}, @var{y}, @var{fs})\n\ |
175 \n\ | 165 @deftypefnx {Loadable Function} {} audiowrite (@var{filename}, @var{y}, @var{fs}, @var{name}, @var{value}, @dots{})\n\ |
176 Write audio data from the matrix @var{y} to a file specified by @var{filename},\n\ | 166 \n\ |
177 file format will be determined by the file extension.\n\ | 167 Write audio data from the matrix @var{y} to @var{filename} with the file\n\ |
178 \n\ | 168 format determined by the file extension.\n\ |
179 @end deftypefn\n\ | 169 \n\ |
180 @deftypefn {Loadable Function} {} audiowrite (@var{filename}, @var{y}, @var{fs}, @var{name}, @var{value})\n\ | 170 Additional name and value argument pairs may be used to specify the\n\ |
181 \n\ | 171 following options:\n\ |
182 Lets you specify additional parameters when writing the file. Those parameters\n\ | |
183 are given in the table below:\n\ | |
184 \n\ | 172 \n\ |
185 @table @samp\n\ | 173 @table @samp\n\ |
186 @item BitsPerSample\n\ | 174 @item BitsPerSample\n\ |
187 Number of bits per sample, valid values are 8, 16, 24 and 32. Default is 16.\n\ | 175 Number of bits per sample, valid values are 8, 16, 24 and 32. Default is 16.\n\ |
188 @item BitRate\n\ | 176 @item BitRate\n\ |
189 Valid argument name, but ignored. Left for compatibility with MATLAB.\n\ | 177 Valid argument name, but ignored. Left for compatibility with @sc{matlab}.\n\ |
190 @item Quality\n\ | 178 @item Quality\n\ |
191 Quality setting for the Ogg Vorbis compressor. Values can range between 0 and 100 with 100 being the highest quality setting. Default is 75.\n\ | 179 Quality setting for the Ogg Vorbis compressor. Values can range between 0 and 100 with 100 being the highest quality setting. Default is 75.\n\ |
192 @item Title\n\ | 180 @item Title\n\ |
193 Title for the audio file.\n\ | 181 Title for the audio file.\n\ |
194 @item Artist\n\ | 182 @item Artist\n\ |