Skip to content

Commit 8b5de13

Browse files
committed
fix read and blocks function format
1 parent a8a77c1 commit 8b5de13

1 file changed

Lines changed: 2 additions & 16 deletions

File tree

soundfile.py

Lines changed: 2 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -321,13 +321,7 @@ def read(file: FileDescriptorOrPath, frames: int = -1, start: int = 0, stop: Opt
321321
with SoundFile(file, 'r', samplerate, channels,
322322
subtype, endian, format, closefd) as f:
323323
frames = f._prepare_read(start, stop, frames)
324-
data = f.read(
325-
frames,
326-
dtype=dtype,
327-
always_2d=always_2d,
328-
fill_value=fill_value,
329-
out=out
330-
)
324+
data = f.read(frames, dtype, always_2d, fill_value, out)
331325
return data, f.samplerate
332326

333327

@@ -450,15 +444,7 @@ def blocks(file: FileDescriptorOrPath, blocksize: Optional[int] = None,
450444
with SoundFile(file, 'r', samplerate, channels,
451445
subtype, endian, format, closefd) as f:
452446
frames = f._prepare_read(start, stop, frames)
453-
for block in f.blocks(
454-
blocksize=blocksize,
455-
overlap=overlap,
456-
frames=frames,
457-
dtype=dtype,
458-
always_2d=always_2d,
459-
fill_value=fill_value,
460-
out=out
461-
):
447+
for block in f.blocks(blocksize, overlap, frames, dtype, always_2d, fill_value, out):
462448
yield block
463449

464450

0 commit comments

Comments
 (0)