[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #63061] sound() is broken
From: |
Philip Nienhuis |
Subject: |
[Octave-bug-tracker] [bug #63061] sound() is broken |
Date: |
Thu, 15 Sep 2022 14:10:17 -0400 (EDT) |
Follow-up Comment #2, bug #63061 (project octave):
Looks like it is this stanza in cset by Rik:
http://hg.savannah.gnu.org/hgweb/octave/rev/6d96538052b9
:
-function playblocking (varargin)
+function playblocking (player, length)
- if (nargin < 1 || nargin > 2)
+ if (nargin != 2)
print_usage ();
endif
- __player_playblocking__ (struct (varargin{1}).player, varargin{2:end});
+ __player_playblocking__ (struct (player).player, length);
endfunction
+
:
The input check overlooks nargin == 2 and (OK, nitty-gritty) argument 'length'
shadows a built-in function.
If you patch playblocking to look as follows:
function playblocking (player, llength = 1)
if (nargin < 1 || nargin > 2)
print_usage ();
endif
__player_playblocking__ (struct (player).player, llength);
endfunction
it'll work.
cc'íng Rik
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?63061>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/