source: scripts/untested/blfs-patches/lame-3.96-libsndfile_fixes.patch@ b15e4602

clfs-1.2 clfs-2.1 clfs-3.0.0-systemd clfs-3.0.0-sysvinit systemd sysvinit
Last change on this file since b15e4602 was fd5b1fe, checked in by Jim Gifford <clfs@…>, 19 years ago

r588@server (orig r586): ryan | 2005-08-05 22:47:43 -0700
Add pile of new patches for blfs packages



  • Property mode set to 100644
File size: 6.5 KB
  • configure

    Submitted By: Ryan Oliver <ryan.oliver@pha.com.au>
    Date: 2005-07-24
    Initial Package Version: 3.96
    Upstream Status: Unknown (wasn't applied to 3.96.1)
    Origin: lame-dev
    	https://sourceforge.net/tracker/download.php?group_id=290&atid=300290&file_id=90970&aid=974622
    Description: Fixes use of libsndfile in lame due to changes in the libsndfile 
                 API after v0.77
    
    diff -rubN lame-3.96-VANILLA/configure lame-3.96-EL/configure
    old new  
    2653926539
    2654026540CONFIG_MATH_LIB="${USE_LIBM}"
    2654126541
    26542 echo "$as_me:$LINENO: checking for sf_open_read in -lsndfile" >&5
    26543 echo $ECHO_N "checking for sf_open_read in -lsndfile... $ECHO_C" >&6
    26544 if test "${ac_cv_lib_sndfile_sf_open_read+set}" = set; then
     26542echo "$as_me:$LINENO: checking for sf_open in -lsndfile" >&5
     26543echo $ECHO_N "checking for sf_open in -lsndfile... $ECHO_C" >&6
     26544if test "${ac_cv_lib_sndfile_sf_open+set}" = set; then
    2654526545  echo $ECHO_N "(cached) $ECHO_C" >&6
    2654626546else
    2654726547  ac_check_lib_save_LIBS=$LIBS
     
    2656026560#endif
    2656126561/* We use char because int might match the return type of a gcc2
    2656226562   builtin and then its argument prototype would still apply.  */
    26563 char sf_open_read ();
     26563char sf_open ();
    2656426564int
    2656526565main ()
    2656626566{
    26567 sf_open_read ();
     26567sf_open ();
    2656826568  ;
    2656926569  return 0;
    2657026570}
     
    2658126581  ac_status=$?
    2658226582  echo "$as_me:$LINENO: \$? = $ac_status" >&5
    2658326583  (exit $ac_status); }; }; then
    26584   ac_cv_lib_sndfile_sf_open_read=yes
     26584  ac_cv_lib_sndfile_sf_open=yes
    2658526585else
    2658626586  echo "$as_me: failed program was:" >&5
    2658726587sed 's/^/| /' conftest.$ac_ext >&5
    2658826588
    26589 ac_cv_lib_sndfile_sf_open_read=no
     26589ac_cv_lib_sndfile_sf_open=no
    2659026590fi
    2659126591rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
    2659226592LIBS=$ac_check_lib_save_LIBS
    2659326593fi
    26594 echo "$as_me:$LINENO: result: $ac_cv_lib_sndfile_sf_open_read" >&5
    26595 echo "${ECHO_T}$ac_cv_lib_sndfile_sf_open_read" >&6
    26596 if test $ac_cv_lib_sndfile_sf_open_read = yes; then
     26594echo "$as_me:$LINENO: result: $ac_cv_lib_sndfile_sf_open" >&5
     26595echo "${ECHO_T}$ac_cv_lib_sndfile_sf_open" >&6
     26596if test $ac_cv_lib_sndfile_sf_open = yes; then
    2659726597  HAVE_SNDFILE="yes"
    2659826598fi
    2659926599
  • configure.in

    diff -rubN lame-3.96-VANILLA/configure.in lame-3.96-EL/configure.in
    old new  
    358358AC_CHECK_LIB(cpml, cos, USE_LIBM="-lcpml")
    359359CONFIG_MATH_LIB="${USE_LIBM}"
    360360
    361 AC_CHECK_LIB(sndfile, sf_open_read, HAVE_SNDFILE="yes")
     361AC_CHECK_LIB(sndfile, sf_open, HAVE_SNDFILE="yes")
    362362
    363363
    364364dnl configure use of features
  • frontend/get_audio.c

    diff -rubN lame-3.96-VANILLA/frontend/get_audio.c lame-3.96-EL/frontend/get_audio.c
    old new  
    1717 * License along with this library; if not, write to the
    1818 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
    1919 * Boston, MA 02111-1307, USA.
     20 *
     21 * Modified June 4, 2004 by E. Lassauge <lassauge AT users.sourceforge.net>
     22 * for libsndfile-1.0.9
    2023 */
    2124
    2225/* $Id: get_audio.c,v 1.99 2004/02/26 17:20:51 takehiro Exp $ */
     
    572592        /* set some defaults incase input is raw PCM */
    573593        gs_wfInfo.seekable = (input_format != sf_raw); /* if user specified -r, set to not seekable */
    574594        gs_wfInfo.samplerate = lame_get_in_samplerate( gfp );
    575         gs_wfInfo.pcmbitwidth = in_bitwidth;
    576595        gs_wfInfo.channels = lame_get_num_channels( gfp );
    577596
    578597        if (in_bitwidth == 8) {
    579598            if (in_signed)
    580                 gs_wfInfo.format = SF_FORMAT_RAW_S8;
     599                gs_wfInfo.format = SF_FORMAT_PCM_S8;
    581600            else
    582                 gs_wfInfo.format = SF_FORMAT_RAW_U8;
     601                gs_wfInfo.format = SF_FORMAT_PCM_U8;
    583602
    584603        } else {
    585604            if (!in_signed) {
     
    588607            }
    589608            if (in_endian != order_unknown) {
    590609                if (in_endian == order_littleEndian)
    591                     gs_wfInfo.format = SF_FORMAT_RAW_LE;
     610                    gs_wfInfo.format = SF_ENDIAN_LITTLE;
    592611                else
    593                     gs_wfInfo.format = SF_FORMAT_RAW_BE;
     612                    gs_wfInfo.format = SF_ENDIAN_BIG;
    594613            } else {
    595614#ifndef WORDS_BIGENDIAN
    596615                /* little endian */
    597616                if (swapbytes)
    598                     gs_wfInfo.format = SF_FORMAT_RAW_BE;
     617                    gs_wfInfo.format = SF_ENDIAN_BIG;
    599618                else
    600                     gs_wfInfo.format = SF_FORMAT_RAW_LE;
     619                    gs_wfInfo.format = SF_ENDIAN_LITTLE;
    601620#else
    602621                if (swapbytes)
    603                     gs_wfInfo.format = SF_FORMAT_RAW_LE;
     622                    gs_wfInfo.format = SF_ENDIAN_BIG;
    604623                else
    605                     gs_wfInfo.format = SF_FORMAT_RAW_BE;
     624                    gs_wfInfo.format = SF_ENDIAN_LITTLE;
    606625#endif
    607626            }
    608627        }
    609628
    610         gs_pSndFileIn = sf_open_read(lpszFileName, &gs_wfInfo);
    611         musicin = (SNDFILE *) gs_pSndFileIn;
     629        gs_pSndFileIn = sf_open(lpszFileName, SFM_READ, &gs_wfInfo);
     630        musicin = (FILE *) gs_pSndFileIn;
    612631
    613632        /* Check result */
    614633        if (gs_pSndFileIn == NULL) {
     
    618637            exit(1);
    619638        }
    620639
    621         if ((gs_wfInfo.format == SF_FORMAT_RAW_LE) ||
    622             (gs_wfInfo.format == SF_FORMAT_RAW_BE) ||
    623             (gs_wfInfo.format == SF_FORMAT_RAW_S8) ||
    624             (gs_wfInfo.format == SF_FORMAT_RAW_U8))
     640        if ((gs_wfInfo.format == SF_ENDIAN_LITTLE) ||
     641            (gs_wfInfo.format == SF_ENDIAN_BIG) ||
     642            (gs_wfInfo.format == SF_FORMAT_PCM_S8) ||
     643            (gs_wfInfo.format == SF_FORMAT_PCM_U8))
    625644            input_format = sf_raw;
    626645
    627646#ifdef _DEBUG_SND_FILE
     
    629648        DEBUGF("samplerate        :%d\n", gs_wfInfo.samplerate);
    630649        DEBUGF("samples           :%d\n", gs_wfInfo.samples);
    631650        DEBUGF("channels          :%d\n", gs_wfInfo.channels);
    632         DEBUGF("pcmbitwidth       :%d\n", gs_wfInfo.pcmbitwidth);
     651        DEBUGF("pcmbitwidth       :%d\n", pcmbitwidth);
    633652        DEBUGF("format            :");
    634653
    635654        /* new formats from sbellon@sbellon.de  1/2000 */
     
    707726        }
    708727
    709728        DEBUGF("\n");
    710         DEBUGF("pcmbitwidth       :%d\n", gs_wfInfo.pcmbitwidth);
     729        DEBUGF("pcmbitwidth       :%d\n", pcmbitwidth);
    711730        DEBUGF("sections          :%d\n", gs_wfInfo.sections);
    712731        DEBUGF("seekable          :\n", gs_wfInfo.seekable);
    713732#endif
    714733
    715         (void) lame_set_num_samples( gfp, gs_wfInfo.samples );
     734        (void) lame_set_num_samples( gfp, gs_wfInfo.frames );
    716735        if( -1 == lame_set_num_channels( gfp, gs_wfInfo.channels ) ) {
    717736            fprintf( stderr,
    718737                     "Unsupported number of channels: %ud\n",
     
    720739            exit( 1 );
    721740        }
    722741        (void) lame_set_in_samplerate( gfp, gs_wfInfo.samplerate );
    723         pcmbitwidth = gs_wfInfo.pcmbitwidth;
    724742    }
    725743
    726744    if (lame_get_num_samples( gfp ) == MAX_U_32_NUM) {
Note: See TracBrowser for help on using the repository browser.