These patches add support for loading (but not playing back) .wav, .flac, .ogg, and .mp3 files. Unfortunately, there is a lot of code repetition between these classes as they're all basically wrappers around a pydub.AudioSegment.
However, we need to separate them out into different classes because
They handle different file extensions / mime types
They rely on the third party library pydub, and we don't want to be importing that in base.py.
These patches add support for loading (but not playing back)
.wav
,.flac
,.ogg
, and.mp3
files. Unfortunately, there is a lot of code repetition between these classes as they're all basically wrappers around apydub.AudioSegment
.However, we need to separate them out into different classes because
pydub
, and we don't want to be importing that inbase.py
.