output/Source: release the mutex while the filter runs
The filter can take some time to finish, even more so on a weak machine with a saturated CPU. By not holding the mutex during that time, we can reduce PlayerThread latency a lot, because that thread needs to synchronize a lot with all outputs.
This commit is contained in:
@@ -264,7 +264,7 @@ AudioOutput::WaitForDelay()
|
||||
bool
|
||||
AudioOutput::FillSourceOrClose()
|
||||
try {
|
||||
return source.Fill();
|
||||
return source.Fill(mutex);
|
||||
} catch (const std::runtime_error &e) {
|
||||
FormatError(e, "Failed to filter for output \"%s\" [%s]",
|
||||
name, plugin.name);
|
||||
|
||||
Reference in New Issue
Block a user