comparison libinterp/dldfcn/audioinfo.cc @ 19526:1cc6bcc5b90c

fix audioinfo crashing when no arguments are given * audioinfo.cc: when the wrong number of arguments is given abort with an error message
author Vytautas Jančauskas <unaudio@gmail.com>
date Thu, 19 Sep 2013 15:23:59 +0300
parents 93f26237c30b
children 8bb399569393
comparison
equal deleted inserted replaced
19525:93f26237c30b 19526:1cc6bcc5b90c
12 \n\ 12 \n\
13 @end deftypefn" 13 @end deftypefn"
14 ) 14 )
15 { 15 {
16 octave_scalar_map retval; 16 octave_scalar_map retval;
17 if (args.length () != 1 || not args(0).is_string ())
18 {
19 print_usage ();
20 return octave_value(retval);
21 }
17 #ifdef HAVE_SNDFILE 22 #ifdef HAVE_SNDFILE
18 Matrix audio; 23 Matrix audio;
19 SNDFILE *file; 24 SNDFILE *file;
20 SF_INFO info; 25 SF_INFO info;
21 info.format = 0; 26 info.format = 0;