Mercurial > hg > octave-nkf
comparison scripts/audio/wavread.m @ 17193:af2051e363ea
Fix return arguments for wavread (...,"size"), bug #39639.
* scripts/audio/wavread.m: Return two arguments in two output variables.
* scripts/audio/wavwrite.m: Add %!tests for "size", and [N], [N1, N2]
inputs to wavread.
author | Rik <rik@octave.org> |
---|---|
date | Wed, 07 Aug 2013 07:35:01 -0700 |
parents | b10a23fe80bb |
children | d63878346099 |
comparison
equal
deleted
inserted
replaced
17192:755ec7bce733 | 17193:af2051e363ea |
---|---|
175 warning ("wavread: seeking failed"); | 175 warning ("wavread: seeking failed"); |
176 endif | 176 endif |
177 length = (param(2)-param(1)+1) * channels; | 177 length = (param(2)-param(1)+1) * channels; |
178 elseif (nparams == 4 && char (param) == "size") | 178 elseif (nparams == 4 && char (param) == "size") |
179 ## Size of the file is requested. | 179 ## Size of the file is requested. |
180 tmp = idivide (8 * data_size, channels * bits_per_sample); | 180 y = idivide (8 * data_size, channels * bits_per_sample); |
181 y = [tmp, channels]; | 181 samples_per_sec = channels; |
182 return; | 182 return; |
183 else | 183 else |
184 error ("wavread: invalid PARAM argument"); | 184 error ("wavread: invalid PARAM argument"); |
185 endif | 185 endif |
186 endif | 186 endif |