bastibe/PySoundFile — pull request #35 by mgeier (2014-06-18 08:26:06+00:00)
Title: Implement a generator for optionally overlapping blocks

for block sf.blocks('filename'):
# do something

The function signature should look something like this:

def blocks('filename', block_len=1024, overlap=0.0, fill_value=None, out=None):

- `overlap` is a float of fractional `block_len`. `overlap=0.5` would advance the read pointer by `512` in each iteration.
- `fill_value` specifies the behavior in the last iteration: Either a full `block_len` is returned (padded with `fill_value`), or a shorter array is returned if `fill_value=None`.