Commit e1cddb46 authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Fix fill_buffer method (#2971)

Summary:
* Add missing docsrtings
* Add default values

Pull Request resolved: https://github.com/pytorch/audio/pull/2971

Reviewed By: xiaohui-zhang

Differential Revision: D42425796

Pulled By: mthrok

fbshipit-source-id: a6a946875142a54424c059bbfbab1908a1564bd3
parent 4a037b03
......@@ -753,9 +753,16 @@ class StreamReader:
"""
return self._be.pop_chunks()
def fill_buffer(self, timeout: Optional[float], backoff: float) -> int:
def fill_buffer(self, timeout: Optional[float] = None, backoff: float = 10.0) -> int:
"""Keep processing packets until all buffers have at least one chunk
Arguments:
timeout (float or None, optional): See
:py:func:`~StreamReader.process_packet`. (Default: ``None``)
backoff (float, optional): See
:py:func:`~StreamReader.process_packet`. (Default: ``10.0``)
Returns:
int:
``0``
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment