Ignore:
Timestamp:
10/07/06 02:49:28 (18 years ago)
Author:
r2d
Message:
  • fixed a LOT of bugs
  • fixed a bug that took me 2 days to find :)
  • remember to ALWAYS use -Wall with a C compiler (C++ is great !!!)
  • files can be played, but are not bit identical with the 1.15w encoder (the last digits of floats are not the same) - must be fixed.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • mppenc/branches/r2d/src/mppenc.c

    r67 r71  
    683683                memcpy ( errorL [Band], errorL[Band] + 36, MAX_NS_ORDER * sizeof (**errorL) );
    684684            }
    685         } else {
    686685        }
    687686
     
    694693                memcpy ( errorR [Band], errorR [Band] + 36, MAX_NS_ORDER * sizeof (**errorL) );
    695694            }
    696         } else {
    697695        }
    698696    }
     
    10351033                        if ( 2 != sscanf ( argv[k], "%f,%f", &(m->KBD1), &(m->KBD2) ))
    10361034                { stderr_printf ( "%s: missing two arguments", arg ); return -1; }
    1037             Init_FFT ();
     1035            Init_FFT (m);
    10381036        }
    10391037        else if ( 0 == strcmp ( arg, "fadein") ) {                                      // FadeInTime
     
    15921590
    15931591    // initialize tables which must be initialized once and only once
     1592
     1593        m.SCF_Index_L = (int*) SCF_Index_L;
     1594        m.SCF_Index_R = (int*) SCF_Index_R;
     1595
    15941596#ifdef FAST_MATH
    15951597    Init_FastMath ();                           // check if something has to be done for each file !!
    15961598#endif
    15971599    Init_SV7 ();
     1600        Init_Skalenfaktoren ();
    15981601        Init_Psychoakustik (&m);
    1599         SetQualityParams (&m, 5.0);
    1600     Init_Psychoakustiktabellen (&m);
    1601         Init_Skalenfaktoren ();
    16021602        Init_FPU ();
    16031603        Init_ANS ();
     
    17461746    WriteHeader_SV7 ( &e, m.Max_Band, MainQual, m.MS_Channelmode > 0, LastValidFrame, LastValidSamples, PNS > 0 ? 0x17 : 0x07, m.SampleFreq );
    17471747
     1748
    17481749    // initialize timer
    17491750    ShowProgress (&m, 0, SamplesInWAVE, e.BufferedBits );
     
    18491850        memmove ( Main.S, Main.S + BLOCK, CENTER * sizeof(float) );
    18501851
    1851                 if ( AllSamplesRead + BLOCK > SamplesInWAVE )
    1852                 {
    1853                         int n = 0;
    1854                 }
    1855 
    18561852        // read samples
    18571853        CurrentRead     = Read_WAV_Samples ( &Wave, (int)minf(BLOCK, SamplesInWAVE - AllSamplesRead), &Main, CENTER, ScalingFactorl, ScalingFactorr, &Silence );
Note: See TracChangeset for help on using the changeset viewer.