TeamPyOgg / PyOgg

Simple OGG Vorbis, Opus and FLAC bindings for Python
The Unlicense
63 stars 27 forks source link

AudioFile base class #71

Closed mattgwwalker closed 3 years ago

mattgwwalker commented 3 years ago

There is common code that has been copy-pasted in OpusFile, VorbisFile, and FlacFile.

This common code should be extracted into a common base class (AudioFile).

The tests for those three classes also have common code, which should also be cleaned up.

mattgwwalker commented 3 years ago

The common code has been moved into a common base class: AudioFile.

As a consequence VorbisFile has been cleaned up and now detects additional error conditions. Further, VorbisFile now allows the selection of 8-bit and 16-bit samples and also signed and unsigned representations.

Documentation of AudioFile class needs to be added. The common code in the tests still needs to be cleaned up.

mattgwwalker commented 3 years ago

Documentation has been added.

The common code in the tests isn't obviously refactored. It can stay as it is.

mattgwwalker commented 3 years ago

Pull request #73 resolves this issue. Closing.