diff configure.ac @ 32195:9cb43336c3b3

audiowrite: Allow writing mp3 through libsndfile API (bug #64388). * m4/acinclude.m4 (OCTAVE_CHECK_LIB_SNDFILE_FORMATS): New function that checks if libsndfile is able to write specific audio formats (currently MPEG audio formats, including mp3). * configure.ac: Call OCTAVE_CHECK_LIB_SNDFILE_FORMATS if libsndfile can be used. * libinterp/dldfcn/audioread.cc (extension_to_format): Add m1a lookup. (audiowrite): For file extenstions .mp1, .mp2, or .mp3, explicitly assign corresponding format and MPEG layer. * etc/NEWS.9.md: Add note about new feature.
author John Donoghue <john.donoghue@ieee.org>
date Thu, 06 Jul 2023 11:56:37 -0400
parents 1c99c8f020f7
children 1ce1c922a34b
line wrap: on
line diff
--- a/configure.ac	Sat Jul 15 10:52:57 2023 +0200
+++ b/configure.ac	Thu Jul 06 11:56:37 2023 -0400
@@ -1665,7 +1665,8 @@
   [], [don't use sndfile library, disable audio file I/O],
   [warn_sndfile=
    OCTAVE_CHECK_LIB_SNDFILE_OK(
-    [AC_DEFINE(HAVE_SNDFILE, 1, [Define to 1 if sndfile is available.])],
+    [AC_DEFINE(HAVE_SNDFILE, 1, [Define to 1 if sndfile is available.])
+     OCTAVE_CHECK_LIB_SNDFILE_FORMATS],
     [warn_sndfile="sndfile library found, but does not seem to work properly; disabling audio file I/O functions"])])
 
 ### Check for PortAudio library.