comparison src/cdrom/macosx/AudioFileReaderThread.c @ 2698:e1da92da346c gsoc2008_nds

Clean up.
author Darren Alton <dalton@stevens.edu>
date Wed, 27 Aug 2008 04:23:38 +0000
parents c121d94672cb
children 99210400e8b9
comparison
equal deleted inserted replaced
2697:c9121b04cffa 2698:e1da92da346c
333 theItem->mFinishedReadingData = 1; 333 theItem->mFinishedReadingData = 1;
334 continue; 334 continue;
335 } 335 }
336 /* construct pointer */ 336 /* construct pointer */
337 char *writePtr = (char *) (theItem->GetFileBuffer(theItem) + 337 char *writePtr = (char *) (theItem->GetFileBuffer(theItem) +
338 (theItem-> 338 (theItem->mWriteToFirstBuffer ? 0 :
339 mWriteToFirstBuffer ? 0 : theItem-> 339 theItem->mChunkSize));
340 mChunkSize));
341 340
342 /* read data */ 341 /* read data */
343 result = theItem->Read(theItem, writePtr, &dataChunkSize); 342 result = theItem->Read(theItem, writePtr, &dataChunkSize);
344 if (result != noErr && result != eofErr) { 343 if (result != noErr && result != eofErr) {
345 AudioFilePlayer *afp = 344 AudioFilePlayer *afp =
484 *inOutDataSize = 0; 483 *inOutDataSize = 0;
485 *inOutData = 0; 484 *inOutData = 0;
486 } else { 485 } else {
487 *inOutDataSize = afm->mChunkSize; 486 *inOutDataSize = afm->mChunkSize;
488 *inOutData = 487 *inOutData =
489 afm->mReadFromFirstBuffer ? afm->mFileBuffer : (afm-> 488 afm->mReadFromFirstBuffer ? afm->mFileBuffer : (afm->mFileBuffer +
490 mFileBuffer +
491 afm->mChunkSize); 489 afm->mChunkSize);
492 } 490 }
493 491
494 afm->mLockUnsuccessful = !sReaderThread->TryNextRead(sReaderThread, afm); 492 afm->mLockUnsuccessful = !sReaderThread->TryNextRead(sReaderThread, afm);
495 493