Mercurial > hg > octave-nkf
diff scripts/deprecated/setaudio.m @ 20349:bcf0a288aa6c stable
maint: Merge default to stable in preparation for 4.0.0 release.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Tue, 28 Apr 2015 12:12:16 -0400 |
parents | 4197fc428c7d |
children |
line wrap: on
line diff
copy from scripts/audio/setaudio.m copy to scripts/deprecated/setaudio.m --- a/scripts/audio/setaudio.m +++ b/scripts/deprecated/setaudio.m @@ -1,4 +1,4 @@ -## Copyright (C) 1995-2013 John W. Eaton +## Copyright (C) 1995-2015 John W. Eaton ## ## This file is part of Octave. ## @@ -20,6 +20,11 @@ ## @deftypefn {Function File} {} setaudio () ## @deftypefnx {Function File} {} setaudio (@var{w_type}) ## @deftypefnx {Function File} {} setaudio (@var{w_type}, @var{value}) +## +## @code{setaudio} is deprecated and will be removed in Octave version 4.4. +## Please scale the audio signal in all new code or use the operating system's +## native tools to adjust audio input and output levels. +## ## Execute the shell command @samp{mixer}, possibly with optional ## arguments @var{w_type} and @var{value}. ## @end deftypefn @@ -30,6 +35,13 @@ function setaudio (w_type, value) + persistent warned = false; + if (! warned) + warned = true; + warning ("Octave:deprecated-function", + "setaudio is obsolete and will be removed from a future version of Octave, please scale the audio signal instead"); + endif + if (nargin == 0) system ("mixer"); elseif (nargin == 1)