Skip to content

Commit

Permalink
v0.2.0.post0 --duration fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tgarc committed Jun 9, 2018
1 parent 4d2412e commit 71ed4bc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pastream.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
## from timeit import default_timer as timer
## gtime = None

__version__ = '0.2.0'
__version__ = '0.2.0.post0'


# Set a default size for the audio callback ring buffer
Expand Down Expand Up @@ -1576,7 +1576,7 @@ def _FileStreamFactory(record=None, playback=None, buffersize=None, loop=False,
v = locs[k]
if v is None: continue
if isinstance(v, str): # parse the format H:M:S to number of seconds
seconds = sum(x * (60.0 ** i) for i, x in enumerate(v.split(':')[::-1]))
seconds = sum(int(x) * (60.0 ** i) for i, x in enumerate(v.split(':')[::-1]))
v = int(round(seconds * stream.samplerate))
setattr(stream, '_' + k, v)

Expand Down

0 comments on commit 71ed4bc

Please sign in to comment.