Package: kino
Severity: normal
Tags: patch
When building 'kino' on amd64 with gcc-4.0,
I get the following error:
frame.h: In member function 'void InternalAudioResample<input_t,
output_t>::Resample(input_t*, int, int, int)':
frame.h:273: error: 'output_rate' was not declared in this scope
frame.h:274: error: 'size' was not declared in this scope
frame.h:287: error: 'output' was not declared in this scope
frame.h: In member function 'void SrcAudioResample<input_t,
output_t>::Resample(input_t*, int, int, int)':
frame.h:326: error: 'output_rate' was not declared in this scope
frame.h:333: error: 'size' was not declared in this scope
frame.h:342: error: 'output' was not declared in this scope
frame.h:344: error: 'output' was not declared in this scope
frame.h: At global scope:
frame.h:376: warning: 'class FramePool' has virtual functions but non-virtual
destructor
make[4]: *** [preferences.o] Error 1
make[4]: Leaving directory `/kino-0.75/src'
With the attached patch 'kino' can be compiled
on amd64 using gcc-4.0.
Regards
Andreas Jochens
diff -urN ../tmp-orig/kino-0.75/debian/patches/00list ./debian/patches/00list
--- ../tmp-orig/kino-0.75/debian/patches/00list 2005-03-22 12:15:49.380631713
+0100
+++ ./debian/patches/00list 2005-03-22 12:15:14.175433423 +0100
@@ -4,3 +4,5 @@
20_64bit_cast_fix
20_endian_types
30_wav_endian_fixes
+40_gcc4_fix
+
diff -urN ../tmp-orig/kino-0.75/debian/patches/40_gcc4_fix.dpatch
./debian/patches/40_gcc4_fix.dpatch
--- ../tmp-orig/kino-0.75/debian/patches/40_gcc4_fix.dpatch 1970-01-01
01:00:00.000000000 +0100
+++ ./debian/patches/40_gcc4_fix.dpatch 2005-03-22 12:02:08.000000000 +0100
@@ -0,0 +1,67 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 40_gcc4_fix.dpatch
+##
+## All lines beginning with `## DP:' are a description of the patch.
+
[EMAIL PROTECTED]@
+
+diff -urN tmp/frame.h kino/src/frame.h
+--- tmp/frame.h 2005-03-22 11:58:40.242379000 +0100
++++ kino/src/frame.h 2005-03-22 12:00:29.323319917 +0100
+@@ -270,21 +270,21 @@
+ */
+ void Resample( input_t *input, int input_rate, int channels, int
samples )
+ {
+- float ratio = ( float ) output_rate / ( float ) input_rate;
+- size = ( int ) ( ( float ) samples * ratio );
++ float ratio = ( float ) this->output_rate / ( float )
input_rate;
++ this->size = ( int ) ( ( float ) samples * ratio );
+
+ int rounding = 1 << 15;
+- unsigned int xfactor = ( samples << 16 ) / size;
+- unsigned int xmax = xfactor * size;
++ unsigned int xfactor = ( samples << 16 ) / this->size;
++ unsigned int xmax = xfactor * this->size;
+ unsigned int i = 0;
+ unsigned int o = 0;
+- size *= sizeof(output_t) * channels;
++ this->size *= sizeof(output_t) * channels;
+
+ for ( unsigned int xft = 0; xft < xmax; xft += xfactor )
+ {
+ i = ( ( xft + rounding ) >> 16 ) * channels;
+ for (int c=0; c < channels; c++)
+- output[o+c] = input[i+c];
++ this->output[o+c] = input[i+c];
+ o += channels;
+ }
+
+@@ -323,14 +323,14 @@
+
+ data.data_in = input_buffer;
+ data.data_out = output_buffer;
+- data.src_ratio = ( float ) output_rate / ( float ) input_rate;
++ data.src_ratio = ( float ) this->output_rate / ( float )
input_rate;
+ data.input_frames = samples;
+ data.output_frames = BUFFER_LEN / channels;
+ data.end_of_input = 0;
+ int result = src_process ( state, &data );
+ if ( result != 0 )
+ cerr << "SRC: " << src_strerror( result ) << endl;
+- size = data.output_frames_gen * channels * sizeof(output_t);
++ this->size = data.output_frames_gen * channels *
sizeof(output_t);
+ for ( int i = 0; i < data.output_frames_gen * channels; ++i )
+ {
+ float sample = output_buffer[ i ];
+@@ -339,9 +339,9 @@
+ if ( sample < -1.0 )
+ sample = -1.0;
+ if ( sample >= 0 )
+- output[ i ] = ( long int )( 32767.0 * sample );
++ this->output[ i ] = ( long int )( 32767.0 *
sample );
+ else
+- output[ i ] = ( long int )( 32768.0 * sample );
++ this->output[ i ] = ( long int )( 32768.0 *
sample );
+ }
+ }
+
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]