# HG changeset patch # User Vytautas JanĨauskas # Date 1379593105 -10800 # Node ID 93f26237c30b61c741c9ba9375ae153f8ff899bf # Parent 9a9b0985e50800c9265a05c031bc65ae5a97454d fix some missing semicolons and add some conditional compilation constructs to audio functions * audioinfo.cc, audioread.cc, audiowrite.cc: fix a missing semicolon * audiowrite.cc: prevent building the extension to format table if sndfile is not present diff -r 9a9b0985e508 -r 93f26237c30b libinterp/dldfcn/audioinfo.cc --- a/libinterp/dldfcn/audioinfo.cc Thu Sep 19 15:13:48 2013 +0300 +++ b/libinterp/dldfcn/audioinfo.cc Thu Sep 19 15:18:25 2013 +0300 @@ -58,7 +58,7 @@ retval.assign ("Artist", sf_get_string (file, SF_STR_ARTIST)); retval.assign ("Comment", sf_get_string (file, SF_STR_COMMENT)); #else - error("sndfile not found on your system and thus audioinfo is not functional") + error("sndfile not found on your system and thus audioinfo is not functional"); #endif return octave_value(retval); } diff -r 9a9b0985e508 -r 93f26237c30b libinterp/dldfcn/audioread.cc --- a/libinterp/dldfcn/audioread.cc Thu Sep 19 15:13:48 2013 +0300 +++ b/libinterp/dldfcn/audioread.cc Thu Sep 19 15:18:25 2013 +0300 @@ -109,7 +109,7 @@ retval(0) = ret_audio; retval(1) = info.samplerate; #else - error("sndfile not found on your system and thus audioread is not functional") + error("sndfile not found on your system and thus audioread is not functional"); #endif return octave_value(retval); } diff -r 9a9b0985e508 -r 93f26237c30b libinterp/dldfcn/audiowrite.cc --- a/libinterp/dldfcn/audiowrite.cc Thu Sep 19 15:13:48 2013 +0300 +++ b/libinterp/dldfcn/audiowrite.cc Thu Sep 19 15:18:25 2013 +0300 @@ -6,6 +6,7 @@ #include #include +#ifdef HAVE_SNDFILE static void fill_extension_table(std::map &table) { table["wav"] = SF_FORMAT_WAV; @@ -34,6 +35,7 @@ table["mpc2k"] = SF_FORMAT_MPC2K; table["rf64"] = SF_FORMAT_RF64; } +#endif DEFUN_DLD(audiowrite, args, , "-*- texinfo -*-\n\ @@ -164,7 +166,7 @@ sf_close (file); free (data); #else - error("sndfile not found on your system and thus audiowrite is not functional") + error("sndfile not found on your system and thus audiowrite is not functional"); #endif return octave_value(retval); }