changeset 19525:93f26237c30b

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
author Vytautas Jančauskas <unaudio@gmail.com>
date Thu, 19 Sep 2013 15:18:25 +0300
parents 9a9b0985e508
children 1cc6bcc5b90c
files libinterp/dldfcn/audioinfo.cc libinterp/dldfcn/audioread.cc libinterp/dldfcn/audiowrite.cc
diffstat 3 files changed, 5 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- 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);
 }
--- 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);
 }
--- 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 <string>
 #include <map>
 
+#ifdef HAVE_SNDFILE
 static void fill_extension_table(std::map<std::string, int> &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);
 }