source:
scripts/untested/blfs-patches/lame-3.96-libsndfile_fixes.patch@
a8f17cf
Last change on this file since a8f17cf was fd5b1fe, checked in by , 19 years ago | |
---|---|
|
|
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 26539 26539 26540 26540 CONFIG_MATH_LIB="${USE_LIBM}" 26541 26541 26542 echo "$as_me:$LINENO: checking for sf_open _readin -lsndfile" >&526543 echo $ECHO_N "checking for sf_open _readin -lsndfile... $ECHO_C" >&626544 if test "${ac_cv_lib_sndfile_sf_open _read+set}" = set; then26542 echo "$as_me:$LINENO: checking for sf_open in -lsndfile" >&5 26543 echo $ECHO_N "checking for sf_open in -lsndfile... $ECHO_C" >&6 26544 if test "${ac_cv_lib_sndfile_sf_open+set}" = set; then 26545 26545 echo $ECHO_N "(cached) $ECHO_C" >&6 26546 26546 else 26547 26547 ac_check_lib_save_LIBS=$LIBS … … 26560 26560 #endif 26561 26561 /* We use char because int might match the return type of a gcc2 26562 26562 builtin and then its argument prototype would still apply. */ 26563 char sf_open _read();26563 char sf_open (); 26564 26564 int 26565 26565 main () 26566 26566 { 26567 sf_open _read();26567 sf_open (); 26568 26568 ; 26569 26569 return 0; 26570 26570 } … … 26581 26581 ac_status=$? 26582 26582 echo "$as_me:$LINENO: \$? = $ac_status" >&5 26583 26583 (exit $ac_status); }; }; then 26584 ac_cv_lib_sndfile_sf_open _read=yes26584 ac_cv_lib_sndfile_sf_open=yes 26585 26585 else 26586 26586 echo "$as_me: failed program was:" >&5 26587 26587 sed 's/^/| /' conftest.$ac_ext >&5 26588 26588 26589 ac_cv_lib_sndfile_sf_open _read=no26589 ac_cv_lib_sndfile_sf_open=no 26590 26590 fi 26591 26591 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext 26592 26592 LIBS=$ac_check_lib_save_LIBS 26593 26593 fi 26594 echo "$as_me:$LINENO: result: $ac_cv_lib_sndfile_sf_open _read" >&526595 echo "${ECHO_T}$ac_cv_lib_sndfile_sf_open _read" >&626596 if test $ac_cv_lib_sndfile_sf_open _read= yes; then26594 echo "$as_me:$LINENO: result: $ac_cv_lib_sndfile_sf_open" >&5 26595 echo "${ECHO_T}$ac_cv_lib_sndfile_sf_open" >&6 26596 if test $ac_cv_lib_sndfile_sf_open = yes; then 26597 26597 HAVE_SNDFILE="yes" 26598 26598 fi 26599 26599 -
configure.in
diff -rubN lame-3.96-VANILLA/configure.in lame-3.96-EL/configure.in
old new 358 358 AC_CHECK_LIB(cpml, cos, USE_LIBM="-lcpml") 359 359 CONFIG_MATH_LIB="${USE_LIBM}" 360 360 361 AC_CHECK_LIB(sndfile, sf_open _read, HAVE_SNDFILE="yes")361 AC_CHECK_LIB(sndfile, sf_open, HAVE_SNDFILE="yes") 362 362 363 363 364 364 dnl 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 17 17 * License along with this library; if not, write to the 18 18 * Free Software Foundation, Inc., 59 Temple Place - Suite 330, 19 19 * 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 20 23 */ 21 24 22 25 /* $Id: get_audio.c,v 1.99 2004/02/26 17:20:51 takehiro Exp $ */ … … 572 592 /* set some defaults incase input is raw PCM */ 573 593 gs_wfInfo.seekable = (input_format != sf_raw); /* if user specified -r, set to not seekable */ 574 594 gs_wfInfo.samplerate = lame_get_in_samplerate( gfp ); 575 gs_wfInfo.pcmbitwidth = in_bitwidth;576 595 gs_wfInfo.channels = lame_get_num_channels( gfp ); 577 596 578 597 if (in_bitwidth == 8) { 579 598 if (in_signed) 580 gs_wfInfo.format = SF_FORMAT_ RAW_S8;599 gs_wfInfo.format = SF_FORMAT_PCM_S8; 581 600 else 582 gs_wfInfo.format = SF_FORMAT_ RAW_U8;601 gs_wfInfo.format = SF_FORMAT_PCM_U8; 583 602 584 603 } else { 585 604 if (!in_signed) { … … 588 607 } 589 608 if (in_endian != order_unknown) { 590 609 if (in_endian == order_littleEndian) 591 gs_wfInfo.format = SF_ FORMAT_RAW_LE;610 gs_wfInfo.format = SF_ENDIAN_LITTLE; 592 611 else 593 gs_wfInfo.format = SF_ FORMAT_RAW_BE;612 gs_wfInfo.format = SF_ENDIAN_BIG; 594 613 } else { 595 614 #ifndef WORDS_BIGENDIAN 596 615 /* little endian */ 597 616 if (swapbytes) 598 gs_wfInfo.format = SF_ FORMAT_RAW_BE;617 gs_wfInfo.format = SF_ENDIAN_BIG; 599 618 else 600 gs_wfInfo.format = SF_ FORMAT_RAW_LE;619 gs_wfInfo.format = SF_ENDIAN_LITTLE; 601 620 #else 602 621 if (swapbytes) 603 gs_wfInfo.format = SF_ FORMAT_RAW_LE;622 gs_wfInfo.format = SF_ENDIAN_BIG; 604 623 else 605 gs_wfInfo.format = SF_ FORMAT_RAW_BE;624 gs_wfInfo.format = SF_ENDIAN_LITTLE; 606 625 #endif 607 626 } 608 627 } 609 628 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; 612 631 613 632 /* Check result */ 614 633 if (gs_pSndFileIn == NULL) { … … 618 637 exit(1); 619 638 } 620 639 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)) 625 644 input_format = sf_raw; 626 645 627 646 #ifdef _DEBUG_SND_FILE … … 629 648 DEBUGF("samplerate :%d\n", gs_wfInfo.samplerate); 630 649 DEBUGF("samples :%d\n", gs_wfInfo.samples); 631 650 DEBUGF("channels :%d\n", gs_wfInfo.channels); 632 DEBUGF("pcmbitwidth :%d\n", gs_wfInfo.pcmbitwidth);651 DEBUGF("pcmbitwidth :%d\n", pcmbitwidth); 633 652 DEBUGF("format :"); 634 653 635 654 /* new formats from sbellon@sbellon.de 1/2000 */ … … 707 726 } 708 727 709 728 DEBUGF("\n"); 710 DEBUGF("pcmbitwidth :%d\n", gs_wfInfo.pcmbitwidth);729 DEBUGF("pcmbitwidth :%d\n", pcmbitwidth); 711 730 DEBUGF("sections :%d\n", gs_wfInfo.sections); 712 731 DEBUGF("seekable :\n", gs_wfInfo.seekable); 713 732 #endif 714 733 715 (void) lame_set_num_samples( gfp, gs_wfInfo. samples );734 (void) lame_set_num_samples( gfp, gs_wfInfo.frames ); 716 735 if( -1 == lame_set_num_channels( gfp, gs_wfInfo.channels ) ) { 717 736 fprintf( stderr, 718 737 "Unsupported number of channels: %ud\n", … … 720 739 exit( 1 ); 721 740 } 722 741 (void) lame_set_in_samplerate( gfp, gs_wfInfo.samplerate ); 723 pcmbitwidth = gs_wfInfo.pcmbitwidth;724 742 } 725 743 726 744 if (lame_get_num_samples( gfp ) == MAX_U_32_NUM) {
Note:
See TracBrowser
for help on using the repository browser.