Ticket #2665: APE_reader.diff
File APE_reader.diff, 1.7 KB (added by , 16 years ago) |
---|
-
APE_reader/APEReader.cpp
2 2 3 3 /*============================================================================*/ 4 4 const char* gAppName = "APE (Monkey's Audio) reader"; 5 const char* gAppVer = "Ver 1.1 2";6 const char* gCright = "Copyright "B_UTF8_COPYRIGHT" 2005-200 8by SHINTA";5 const char* gAppVer = "Ver 1.13"; 6 const char* gCright = "Copyright "B_UTF8_COPYRIGHT" 2005-2009 by SHINTA"; 7 7 const char* gAppSignature = "application/x-vnd.SHINTA-MediaKitAPEReader"; 8 8 /*============================================================================*/ 9 9 … … 139 139 //------------------------------------------------------------------------------ 140 140 status_t TAPEReader::Seek(void* oCookie, uint32 oFlags, int64* oFrame, bigtime_t* oTime) 141 141 { 142 return B_ERROR;143 #if 0 // not work in Haiku144 142 int32 aNewBlock; 145 143 146 144 if ( oFlags&B_MEDIA_SEEK_TO_FRAME ) { 147 DBEXP("TAPEReader::Seek()", "Seek by frame not supported yet"); 148 return B_ERROR; 145 aNewBlock = *oFrame; 149 146 } else if ( oFlags&B_MEDIA_SEEK_TO_TIME ) { 150 DBEXP("TAPEReader::Seek() - B_MEDIA_SEEK_TO_TIME", *oTime);151 147 aNewBlock = (*oTime)/1000*mDecomp->GetInfo(APE_DECOMPRESS_TOTAL_BLOCKS)/mDecomp->GetInfo(APE_DECOMPRESS_LENGTH_MS); 152 DBEXP("TAPEReader::Seek() - aNewBlock", aNewBlock);153 148 } else { 154 149 return B_ERROR; 155 150 } 156 151 mReadPosTotal = aNewBlock*mDecomp->GetInfo(APE_INFO_BLOCK_ALIGN); 157 int a =mDecomp->Seek(aNewBlock);152 mDecomp->Seek(aNewBlock); 158 153 ReadBlocks(); 159 154 return B_OK; 160 #endif161 155 } 162 156 //------------------------------------------------------------------------------ 163 157 status_t TAPEReader::Sniff(int32* oStreamCount)