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
RevLine 
[fd5b1fe]1Submitted By: Ryan Oliver <ryan.oliver@pha.com.au>
2Date: 2005-07-24
3Initial Package Version: 3.96
4Upstream Status: Unknown (wasn't applied to 3.96.1)
5Origin: lame-dev
6 https://sourceforge.net/tracker/download.php?group_id=290&atid=300290&file_id=90970&aid=974622
7Description: Fixes use of libsndfile in lame due to changes in the libsndfile
8 API after v0.77
9
10diff -rubN lame-3.96-VANILLA/configure lame-3.96-EL/configure
11--- lame-3.96-VANILLA/configure 2004-04-11 16:47:52.000000000 +0200
12+++ lame-3.96-EL/configure 2004-06-04 17:55:37.197792000 +0200
13@@ -26539,9 +26539,9 @@
14
15 CONFIG_MATH_LIB="${USE_LIBM}"
16
17-echo "$as_me:$LINENO: checking for sf_open_read in -lsndfile" >&5
18-echo $ECHO_N "checking for sf_open_read in -lsndfile... $ECHO_C" >&6
19-if test "${ac_cv_lib_sndfile_sf_open_read+set}" = set; then
20+echo "$as_me:$LINENO: checking for sf_open in -lsndfile" >&5
21+echo $ECHO_N "checking for sf_open in -lsndfile... $ECHO_C" >&6
22+if test "${ac_cv_lib_sndfile_sf_open+set}" = set; then
23 echo $ECHO_N "(cached) $ECHO_C" >&6
24 else
25 ac_check_lib_save_LIBS=$LIBS
26@@ -26560,11 +26560,11 @@
27 #endif
28 /* We use char because int might match the return type of a gcc2
29 builtin and then its argument prototype would still apply. */
30-char sf_open_read ();
31+char sf_open ();
32 int
33 main ()
34 {
35-sf_open_read ();
36+sf_open ();
37 ;
38 return 0;
39 }
40@@ -26581,19 +26581,19 @@
41 ac_status=$?
42 echo "$as_me:$LINENO: \$? = $ac_status" >&5
43 (exit $ac_status); }; }; then
44- ac_cv_lib_sndfile_sf_open_read=yes
45+ ac_cv_lib_sndfile_sf_open=yes
46 else
47 echo "$as_me: failed program was:" >&5
48 sed 's/^/| /' conftest.$ac_ext >&5
49
50-ac_cv_lib_sndfile_sf_open_read=no
51+ac_cv_lib_sndfile_sf_open=no
52 fi
53 rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
54 LIBS=$ac_check_lib_save_LIBS
55 fi
56-echo "$as_me:$LINENO: result: $ac_cv_lib_sndfile_sf_open_read" >&5
57-echo "${ECHO_T}$ac_cv_lib_sndfile_sf_open_read" >&6
58-if test $ac_cv_lib_sndfile_sf_open_read = yes; then
59+echo "$as_me:$LINENO: result: $ac_cv_lib_sndfile_sf_open" >&5
60+echo "${ECHO_T}$ac_cv_lib_sndfile_sf_open" >&6
61+if test $ac_cv_lib_sndfile_sf_open = yes; then
62 HAVE_SNDFILE="yes"
63 fi
64
65diff -rubN lame-3.96-VANILLA/configure.in lame-3.96-EL/configure.in
66--- lame-3.96-VANILLA/configure.in 2004-04-11 16:45:19.000000000 +0200
67+++ lame-3.96-EL/configure.in 2004-06-04 17:54:52.403380800 +0200
68@@ -358,7 +358,7 @@
69 AC_CHECK_LIB(cpml, cos, USE_LIBM="-lcpml")
70 CONFIG_MATH_LIB="${USE_LIBM}"
71
72-AC_CHECK_LIB(sndfile, sf_open_read, HAVE_SNDFILE="yes")
73+AC_CHECK_LIB(sndfile, sf_open, HAVE_SNDFILE="yes")
74
75
76 dnl configure use of features
77diff -rubN lame-3.96-VANILLA/frontend/get_audio.c lame-3.96-EL/frontend/get_audio.c
78--- lame-3.96-VANILLA/frontend/get_audio.c 2004-03-17 15:42:49.000000000 +0100
79+++ lame-3.96-EL/frontend/get_audio.c 2004-06-07 18:45:13.592739200 +0200
80@@ -17,6 +17,9 @@
81 * License along with this library; if not, write to the
82 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
83 * Boston, MA 02111-1307, USA.
84+ *
85+ * Modified June 4, 2004 by E. Lassauge <lassauge AT users.sourceforge.net>
86+ * for libsndfile-1.0.9
87 */
88
89 /* $Id: get_audio.c,v 1.99 2004/02/26 17:20:51 takehiro Exp $ */
90@@ -572,14 +592,13 @@
91 /* set some defaults incase input is raw PCM */
92 gs_wfInfo.seekable = (input_format != sf_raw); /* if user specified -r, set to not seekable */
93 gs_wfInfo.samplerate = lame_get_in_samplerate( gfp );
94- gs_wfInfo.pcmbitwidth = in_bitwidth;
95 gs_wfInfo.channels = lame_get_num_channels( gfp );
96
97 if (in_bitwidth == 8) {
98 if (in_signed)
99- gs_wfInfo.format = SF_FORMAT_RAW_S8;
100+ gs_wfInfo.format = SF_FORMAT_PCM_S8;
101 else
102- gs_wfInfo.format = SF_FORMAT_RAW_U8;
103+ gs_wfInfo.format = SF_FORMAT_PCM_U8;
104
105 } else {
106 if (!in_signed) {
107@@ -588,27 +607,27 @@
108 }
109 if (in_endian != order_unknown) {
110 if (in_endian == order_littleEndian)
111- gs_wfInfo.format = SF_FORMAT_RAW_LE;
112+ gs_wfInfo.format = SF_ENDIAN_LITTLE;
113 else
114- gs_wfInfo.format = SF_FORMAT_RAW_BE;
115+ gs_wfInfo.format = SF_ENDIAN_BIG;
116 } else {
117 #ifndef WORDS_BIGENDIAN
118 /* little endian */
119 if (swapbytes)
120- gs_wfInfo.format = SF_FORMAT_RAW_BE;
121+ gs_wfInfo.format = SF_ENDIAN_BIG;
122 else
123- gs_wfInfo.format = SF_FORMAT_RAW_LE;
124+ gs_wfInfo.format = SF_ENDIAN_LITTLE;
125 #else
126 if (swapbytes)
127- gs_wfInfo.format = SF_FORMAT_RAW_LE;
128+ gs_wfInfo.format = SF_ENDIAN_BIG;
129 else
130- gs_wfInfo.format = SF_FORMAT_RAW_BE;
131+ gs_wfInfo.format = SF_ENDIAN_LITTLE;
132 #endif
133 }
134 }
135
136- gs_pSndFileIn = sf_open_read(lpszFileName, &gs_wfInfo);
137- musicin = (SNDFILE *) gs_pSndFileIn;
138+ gs_pSndFileIn = sf_open(lpszFileName, SFM_READ, &gs_wfInfo);
139+ musicin = (FILE *) gs_pSndFileIn;
140
141 /* Check result */
142 if (gs_pSndFileIn == NULL) {
143@@ -618,10 +637,10 @@
144 exit(1);
145 }
146
147- if ((gs_wfInfo.format == SF_FORMAT_RAW_LE) ||
148- (gs_wfInfo.format == SF_FORMAT_RAW_BE) ||
149- (gs_wfInfo.format == SF_FORMAT_RAW_S8) ||
150- (gs_wfInfo.format == SF_FORMAT_RAW_U8))
151+ if ((gs_wfInfo.format == SF_ENDIAN_LITTLE) ||
152+ (gs_wfInfo.format == SF_ENDIAN_BIG) ||
153+ (gs_wfInfo.format == SF_FORMAT_PCM_S8) ||
154+ (gs_wfInfo.format == SF_FORMAT_PCM_U8))
155 input_format = sf_raw;
156
157 #ifdef _DEBUG_SND_FILE
158@@ -629,7 +648,7 @@
159 DEBUGF("samplerate :%d\n", gs_wfInfo.samplerate);
160 DEBUGF("samples :%d\n", gs_wfInfo.samples);
161 DEBUGF("channels :%d\n", gs_wfInfo.channels);
162- DEBUGF("pcmbitwidth :%d\n", gs_wfInfo.pcmbitwidth);
163+ DEBUGF("pcmbitwidth :%d\n", pcmbitwidth);
164 DEBUGF("format :");
165
166 /* new formats from sbellon@sbellon.de 1/2000 */
167@@ -707,12 +726,12 @@
168 }
169
170 DEBUGF("\n");
171- DEBUGF("pcmbitwidth :%d\n", gs_wfInfo.pcmbitwidth);
172+ DEBUGF("pcmbitwidth :%d\n", pcmbitwidth);
173 DEBUGF("sections :%d\n", gs_wfInfo.sections);
174 DEBUGF("seekable :\n", gs_wfInfo.seekable);
175 #endif
176
177- (void) lame_set_num_samples( gfp, gs_wfInfo.samples );
178+ (void) lame_set_num_samples( gfp, gs_wfInfo.frames );
179 if( -1 == lame_set_num_channels( gfp, gs_wfInfo.channels ) ) {
180 fprintf( stderr,
181 "Unsupported number of channels: %ud\n",
182@@ -720,7 +739,6 @@
183 exit( 1 );
184 }
185 (void) lame_set_in_samplerate( gfp, gs_wfInfo.samplerate );
186- pcmbitwidth = gs_wfInfo.pcmbitwidth;
187 }
188
189 if (lame_get_num_samples( gfp ) == MAX_U_32_NUM) {
Note: See TracBrowser for help on using the repository browser.