When the audio_getid3 module is enabled, it attempts to parse all uploaded audio files for ID3 info, whether they're MP3s or not. This causes an error, for example, when uploading a wav file. Attached patch fixes this, with a simple regex check for a '.mp3' extension on the file.

CommentFileSizeAuthor
wav_no_id3.patch1.05 KBJaza
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

drewish’s picture

Version: 5.x-1.3 » 5.x-2.x-dev

all new changes need to go into HEAD first.

mfb’s picture

getid3 can extract info from many formats including wav and ogg. wav files with metadata are common in film and television for example.

Jaza’s picture

Status: Needs review » Needs work

I'm not an expert on getid3, so I can't comment on its wav handling ability. Nor am I an expert on the wav format - I wasn't aware that it supports any id3-like metadata. However, what I do know is that when I try uploading plain old wav files (without metadata), and that when getid3 tries to parse them, it borks and dies.

Maybe this is a bug with getid3, or maybe we're not calling the right function. But from looking at the source code, it would seem that we are calling getid3 in the right way (i.e. "$getID3->analyze($filepath)"). It also seems that wav files are NOT supported: I see that '.wv' files ("WavPack") are mentioned in the source (getid3.php), but not '.wav'. So the problem is probably with getid3.

mfb’s picture

I don't have 5.x-2.x-dev installed so I can't really help look into the problem. but I do know that getid3 does support WAV (see the RIFF module) and wav metadata. Sounds like it might be a harmless warning message that needs to be suppressed..