Mercurial > sdl-ios-xcode
comparison src/cdrom/macosx/AudioFileReaderThread.c @ 2735:204be4fc2726
Final merge of Google Summer of Code 2008 work...
Port SDL 1.3 to the Nintendo DS
by Darren Alton, mentored by Sam Lantinga
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 27 Aug 2008 15:10:03 +0000 |
parents | c121d94672cb |
children | 99210400e8b9 |
comparison
equal
deleted
inserted
replaced
2734:dd25eabe441c | 2735:204be4fc2726 |
---|---|
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 |