diff options
Diffstat (limited to 'src/outputBuffer.h')
-rw-r--r-- | src/outputBuffer.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/outputBuffer.h b/src/outputBuffer.h index 6e9d7c49f..4aea59120 100644 --- a/src/outputBuffer.h +++ b/src/outputBuffer.h @@ -53,6 +53,10 @@ typedef struct _OutputBuffer { /** the index after the last decoded chunk */ unsigned int volatile end; + /** non-zero if the player thread should only we woken up if + the buffer becomes non-empty */ + int lazy; + AudioFormat audioFormat; ConvState convState; } OutputBuffer; @@ -65,6 +69,14 @@ void ob_clear(void); void ob_flush(void); +/** + * When a chunk is decoded, we wake up the player thread to tell him + * about it. In "lazy" mode, we only wake him up when the buffer was + * previously empty, i.e. when the player thread has really been + * waiting for us. + */ +void ob_set_lazy(int lazy); + /** is the buffer empty? */ int ob_is_empty(void); |