[haiku-development] Re: Donating codes: APE reader

  • From: SHINTA <shinta.0806@xxxxxxxxx>
  • To: haiku-development@xxxxxxxxxxxxx
  • Date: Sun, 01 Jun 2008 14:14:22 +0900

Hi,

 Thank you for explaining about Reader.

 About 1MB problem, I changed CAPEHeader::FindDescriptor() near line 87
as follows:

    nBytesRead = 1;
    int nScanBytes = 0;
*    bigtime_t  DB = system_time();
    while ((nGoalID != nReadID) && (nBytesRead == 1) && (nScanBytes < (1024 * 
1024)))
    {
        unsigned char cTemp;
        m_pIO->Read(&cTemp, 1, &nBytesRead);
        nReadID = (((unsigned int) cTemp) << 24) | (nReadID >> 8);
        nJunkBytes++;
        nScanBytes++;
    }
*    cout << "time: " << system_time()-DB << endl;

 When I dropped a WAV file (not APE) to MediaPlayer, above loop took
about 15 seconds (Terminal out 15877367).

 My VMWare Haiku is r25653, GCC2. Memory is 256MB.


 Regards.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   SHINTA
     E-Mail shinta.0806@xxxxxxxxx
     Web    http://www2u.biglobe.ne.jp/~shinta/be/  (Japanese only)


Other related posts: