forked from Wobbl/Wobuzz
Added option to always clear the cache of the last track when another track starts to greatly reduce memory usage.
This commit is contained in:
parent
cba4fd67fa
commit
dc46ac07bb
5 changed files with 38 additions and 1 deletions
|
@ -47,6 +47,13 @@ class Track:
|
|||
|
||||
self.cached = True
|
||||
|
||||
def clear_cache(self):
|
||||
self.cached = False
|
||||
|
||||
self.audio = None
|
||||
self.sound = None
|
||||
self.duration = 0
|
||||
|
||||
def load_audio(self):
|
||||
type = self.path.split(".")[-1]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue