Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
More tapdancing about thread locking.
Now we mark the sources as mixer_accessible the entire time they're in the playlist, and the mixer grabs a lock while mixing each source. For things that need to sync with the mixer, we now grab that lock from the API thread only if a source is mixer_accessible, and the lock only lasts until a single source has mixed instead of the entire iteration of the mixer thread. mixer_accessible is reset when leaving the playlist. Deleting a playing source and then reallocating it will notice the source is still mixer_accessible and skip over it during alGenSources() until the mixer thread clears this flag later. All this is good progress, but it's making me want to redesign the locking policy _again_.
- Loading branch information
Showing
1 changed file
with
83 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters