Mercurial > octave-nkf
changeset 20613:647db46ad754
eliminate more simple uses of error_state
* audioread.cc: Eliminate simple uses of error_state.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Thu, 08 Oct 2015 17:41:21 -0400 |
parents | 7374a3a6d594 |
children | 10ec79b47808 |
files | libinterp/dldfcn/audioread.cc |
diffstat | 1 files changed, 0 insertions(+), 21 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/dldfcn/audioread.cc Thu Oct 08 17:26:40 2015 -0400 +++ b/libinterp/dldfcn/audioread.cc Thu Oct 08 17:41:21 2015 -0400 @@ -84,9 +84,6 @@ std::string filename = args(0).string_value (); - if (error_state) - return retval; - SF_INFO info; info.format = 0; SNDFILE *file = sf_open (filename.c_str (), SFM_READ, &info); @@ -112,9 +109,6 @@ { RowVector range = args(1).row_vector_value (); - if (error_state) - return retval; - if (range.numel () != 2) { error ("audioread: invalid specification for range of frames"); @@ -159,9 +153,6 @@ else type = args(1).string_value (); - if (error_state) - return retval; - if (type == "native") { switch (info.format & SF_FORMAT_SUBMASK) @@ -301,14 +292,8 @@ std::string filename = args(0).string_value (); - if (error_state) - return retval; - Matrix audio = args(1).matrix_value (); - if (error_state) - return retval; - double bias = 0.0; double scale = 1.0; @@ -326,9 +311,6 @@ int samplerate = args(2).int_value (); - if (error_state) - return retval; - std::string ext; size_t dotpos = filename.find_last_of ("."); if (dotpos != std::string::npos) @@ -498,9 +480,6 @@ std::string filename = args(0).string_value (); - if (error_state) - return retval; - SF_INFO info; info.format = 0; SNDFILE *file = sf_open (filename.c_str (), SFM_READ, &info);