• Bug#266709: ecasound: FTBFS with gcc-3.4: `class SAMPLE_BUFFER_BASE:

    From Andreas Jochens@1:229/2 to All on Wed Aug 18 21:40:12 2004
    From: [email protected]

    Package: ecasound
    Severity: normal
    Tags: patch

    When building 'ecasound' with gcc-3.4 I get the following error:

    g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I. -I../.. -I../../libecasound -I../../kvutils -g -O2 -D_REENTRANT -DNDEBUG -ffast-math -fstrict-aliasing -funroll-loops -DALSA_PCM_OLD_HW_PARAMS_API -DALSA_PCM_OLD_SW_PARAMS_API -Wp,-MD,.deps/audioio_af.pp -c audioio_
    af.cpp -fPIC -DPIC
    In file included from ../../libecasound/samplebuffer.h:223,
    from audioio_af.h:6,
    from audioio_af.cpp:35:
    ../../libecasound/samplebuffer_impl.h: In member function `void SAMPLE_BUFFER_BASE<T>::resample_nofilter(long int, long int)':
    ../../libecasound/samplebuffer_impl.h:881: error: `class SAMPLE_BUFFER_BASE<T>::sample_type' is not a type
    ../../libecasound/samplebuffer_impl.h: In member function `void SAMPLE_BUFFER_BASE<T>::resample_with_memory(long int, long int)':
    ../../libecasound/samplebuffer_impl.h:933: error: `class SAMPLE_BUFFER_BASE<T>::sample_type' is not a type
    make[4]: *** [audioio_af.lo] Error 1
    make[4]: Leaving directory `/ecasound-2.0.4/libecasound/plugins'

    With the attached patch 'ecasound' can be compiled using gcc-3.4.

    Regards
    Andreas Jochens

    diff -urN ../tmp-orig/ecasound-2.0.4/libecasound/samplebuffer_functions.h ./libecasound/samplebuffer_functions.h
    --- ../tmp-orig/ecasound-2.0.4/libecasound/samplebuffer_functions.h 2000-12-12 21:56:14.000000000 +0100
    +++ ./libecasound/samplebuffer_functions.h 2004-08-18 20:32:10.819962873 +0200
    @@ -13,7 +13,7 @@

    public:

    - typedef SAMPLE_BUFFER_BASE<T>::sample_type sample_type;
    + typedef typename SAMPLE_BUFFER_BASE<T>::sample_type sample_type;

    static sample_type max_value(const SAMPLE_BUFFER_BASE<T>& buf,
    SAMPLE_BUFFER::channel_size_t channel) {
    diff -urN ../tmp-orig/ecasound-2.0.4/libecasound/samplebuffer_impl.h ./libecasound/samplebuffer_impl.h
    --- ../tmp-orig/ecasound-2.0.4/libecasound/samplebuffer_impl.h 2002-01-02 10:07:42.000000000 +0100
    +++ ./libecasound/samplebuffer_impl.h 2004-08-18 21:02:10.716337033 +0200
    @@ -17,6 +17,7 @@
    // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
    // ------------------------------------------------------------------------

    +#include <math.h>

    template<class T>
    void SAMPLE_BUFFER_BASE<T>::make_silent(void) {
    @@ -87