From fb77ac9da0f24b02f0f3cd719864b2d2a7507f88 Mon Sep 17 00:00:00 2001 From: Aaron Angert Date: Tue, 29 Dec 2020 17:03:14 -0700 Subject: [PATCH] fixed whence bug --- piaudio.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/piaudio.py b/piaudio.py index 9e653017..6d075714 100644 --- a/piaudio.py +++ b/piaudio.py @@ -183,11 +183,12 @@ def Resample(samples): @functools.lru_cache(maxsize=128) class Audio: def __init__(self, fname): - segment = AudioSegment.from_file(fname) - buf = io.BytesIO() - segment.export(buf, 'wav') - buf.seek(0) - self.sample_ = pygame.mixer.Sound(file=buf) + #these are probably not necessary + #segment = AudioSegment.from_file(fname) + #buf = io.BytesIO() + #segment.export(buf, 'wav') + #buf.seek(0) + self.sample_ = pygame.mixer.Sound(file=fname) self.fname_ = fname #this will not work for files other than wav at the moment