tuffy / python-audio-tools

A collection of audio handling programs which work from the command line.
http://audiotools.sourceforge.net
GNU General Public License v2.0
249 stars 58 forks source link

fixed a typo in aiff.py #37

Closed ryechus closed 9 years ago

ryechus commented 9 years ago

There was a typo in aiff.py that was blocking attempts to retrieve metadata from an aiff file.

Lossless audio files can include metadata even though it is uncommon. It is a little easier to force this data on an aiff file than it is wav file. Audiotools' built in get_metadata() will pull this metadata if it exists regardless of audio type.

Prior to this change I received this error:

Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File "/Users/michael/.virtualenvs/env4/lib/python2.7/site-packages/audiotools/aiff.py", line 690, in get_metadata
    return ID3v22Comment.parse(BitstreamReader(chunk.data(), 0))
  File "/Users/michael/.virtualenvs/env4/lib/python2.7/site-packages/audiotools/aiff.py", line 287, in data
    self.__wav_file__.seek(self.__offset__)
AttributeError: 'AIFF_File_Chunk' object has no attribute '__wav_file__'