mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-26 04:26:14 -05:00
[input] Fix pipe playback bringing cpu to 100%
When pipe playback is started, but no data is written to the pipe, the input loop would bring the cpu to 100%. This fix limits the loop like it was before player refactor.
This commit is contained in:
13
src/input.h
13
src/input.h
@@ -143,21 +143,12 @@ int
|
||||
input_write(struct evbuffer *evbuf, struct media_quality *quality, short flags);
|
||||
|
||||
/*
|
||||
* Input modules can use this to wait for the input_buffer to be ready for
|
||||
* writing. The wait is max INPUT_LOOP_TIMEOUT, which allows the event base to
|
||||
* loop and process pending commands once in a while.
|
||||
* Input modules can use this to wait for the player to read, so the module's
|
||||
* playback-loop doesn't spin out of control.
|
||||
*/
|
||||
int
|
||||
input_wait(void);
|
||||
|
||||
/*
|
||||
* Async switch to the next song in the queue. Mostly for internal use, but
|
||||
* might be relevant some day externally?
|
||||
*/
|
||||
//void
|
||||
//input_next(void);
|
||||
|
||||
|
||||
/* ---------------------- Interface towards player thread ------------------- */
|
||||
/* Thread: player */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user