Mercurial > hg > octave-nkf
diff scripts/deprecated/wavwrite.m @ 20694:c8ec0b72b7a6
Deprecate wavread and wavwrite.
* NEWS: Announce deprecation and replacement functions.
* scripts/deprecated/wavread.m, scripts/deprecated/wavwrite.m:
Moved from scripts/audio. Add deprecation message to docstring.
Add deprecation warning to m-file.
* scripts/audio/module.mk: Remove from build system.
* scripts/deprecated/module.mk: Add deprecated versions to build system.
* audio.txi: Remove functions from manual.
author | Rik <rik@octave.org> |
---|---|
date | Sat, 05 Sep 2015 05:00:46 -0700 |
parents | scripts/audio/wavwrite.m@aa36fb998a4d |
children |
line wrap: on
line diff
copy from scripts/audio/wavwrite.m copy to scripts/deprecated/wavwrite.m --- a/scripts/audio/wavwrite.m +++ b/scripts/deprecated/wavwrite.m @@ -21,6 +21,10 @@ ## @deftypefn {Function File} {} wavwrite (@var{y}, @var{filename}) ## @deftypefnx {Function File} {} wavwrite (@var{y}, @var{fs}, @var{filename}) ## @deftypefnx {Function File} {} wavwrite (@var{y}, @var{fs}, @var{nbits}, @var{filename}) +## +## @code{wavwrite} is deprecated and will be removed in Octave version 4.6. +## Use @code{audiowrite} for the equivalent functionality. +## ## Write the audio signal @var{y} to the RIFF/WAVE sound file @var{filename}. ## ## If @var{y} is a matrix, the columns represent multiple audio channels. @@ -37,8 +41,17 @@ ## @seealso{audiowrite, audioread, wavread} ## @end deftypefn +## Deprecated in 4.2 + function wavwrite (y, varargin) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "wavwrite is obsolete and will be removed from a future version of Octave, please use audiowrite instead"); + endif + if (nargin < 2 || nargin > 4) print_usage (); endif