mirror of
https://github.com/owntone/owntone-server.git
synced 2025-11-26 04:26:14 -05:00
[player] Better fix for resuming playback af long pause (issue #766)
The fix in commit 3928ab6 broke resuming from an underrun, since it meant that
pb_resume() would flush the input buffer. With this fix it is possible to call
input_resume(), which will not flush the buffer if the source is already open.
Also renamed some functions in player.c for consistency.
This commit is contained in:
11
src/input.h
11
src/input.h
@@ -196,6 +196,17 @@ input_buffer_full_cb(input_cb cb);
|
||||
int
|
||||
input_seek(uint32_t item_id, int seek_ms);
|
||||
|
||||
/*
|
||||
* Same as input_seek(), except if the item is already being read we don't do
|
||||
* anything (no flush & seek)
|
||||
*
|
||||
* @in item_id Queue item id to start playing
|
||||
* @in seek_ms Position to start playing
|
||||
* @return Actual seek position if seekable, 0 otherwise, -1 on error
|
||||
*/
|
||||
int
|
||||
input_resume(uint32_t item_id, int seek_ms);
|
||||
|
||||
/*
|
||||
* Same as input_seek(), just non-blocking and does not offer seek.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user