Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[paplayer] - when player is paused - don't process streams but just y…
…ield cpu to other threads
- Loading branch information
470cb07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sleep() instead of CThread::Sleep(), this code is in PAPlayer::Process and the inherited Sleep has a check for bStop so it will abort if the the PAPlayer thread is stopped. 10ms is not much but hey, it all adds up :)
470cb07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same sleep is used 5 lines down for sleeping the watermark stuff. What is the issue when the sleep gets aborted when paplayer thread is stopped? This even would be nice imo?
And i could increase it to 100ms if we want :)
470cb07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess who every added the other did not know about how the inherited Sleep works, or it was some cp monster running around :)
470cb07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But what is the problem with sleep aborting when m_bStop is set? The thread is going to stop then anyway - so?
470cb07
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there is no problem, I'm confused :) Sleep() and CThread::Sleep() are the same thing inside a CThread