| 401 | } |
| 402 | |
| 403 | void FilePlayerNode::readAsyncImpl() |
| 404 | { |
| 405 | size_t lastReadPos = mReadPos; |
| 406 | while( true ) { |
| 407 | unique_lock<mutex> lock( mAsyncReadMutex ); |
| 408 | mIssueAsyncReadCond.wait( lock ); |
| 409 | |
| 410 | if( mAsyncReadShouldQuit ) |
| 411 | return; |
| 412 | |
| 413 | size_t readPos = mReadPos; |
| 414 | if( readPos != lastReadPos ) |
| 415 | mSourceFile->seek( readPos ); |
| 416 | |
| 417 | readImpl(); |
| 418 | lastReadPos = mReadPos; |
| 419 | } |
| 420 | } |
| 421 | |
| 422 | void FilePlayerNode::readImpl() |
| 423 | { |