Mercurial > octave-nkf
diff libinterp/dldfcn/audioread.cc @ 19560:7f271cef5850
protect all portaudio and sndfile dependent code with #ifdefs
* audiodevinfo.cc: Protect all code that depends on portaudio with
#ifdef HAVE_PORTAUDIO
* audioread.cc: Protect all code that depends on sndfile with #ifdef
HAVE_SNDFILE.
author | John W. Eaton <jwe@octave.org> |
---|---|
date | Sat, 03 Jan 2015 02:01:23 -0500 |
parents | e616c2830413 |
children | 5f313345912f |
line wrap: on
line diff
--- a/libinterp/dldfcn/audioread.cc Fri Jan 02 18:05:24 2015 -0800 +++ b/libinterp/dldfcn/audioread.cc Sat Jan 03 02:01:23 2015 -0500 @@ -153,6 +153,7 @@ } #ifdef HAVE_SNDFILE + static void fill_extension_table (std::map<std::string, int> &table) { @@ -182,6 +183,7 @@ table["mpc2k"] = SF_FORMAT_MPC2K; table["rf64"] = SF_FORMAT_RF64; } + #endif DEFUN_DLD (audiowrite, args, , @@ -337,14 +339,14 @@ { octave_value retval; +#ifdef HAVE_SNDFILE + if (args.length () != 1) { print_usage (); return retval; } -#ifdef HAVE_SNDFILE - SF_INFO info; info.format = 0; SNDFILE *file = sf_open (args(0).string_value ().c_str (), SFM_READ, &info);