Waveform doesn't show for quiet files

Bug #72780 reported by Christian Dannie Storgaard
2
Affects Status Importance Assigned to Milestone
Jokosher
Fix Released
Medium
Unassigned

Bug Description

When importing (possibly also when recording) sound files that aren't that loud, no waveform is shown on the track.

Revision history for this message
Christian Dannie Storgaard (cybolic) wrote :

Test ogg file here

Revision history for this message
John Green (john-thegreens) wrote :

Interesting. This file has just a right hand channel. I converted it to mono in audacity and reimported it and the waveform very definitely shows. I think there is a bug in our level measurement if the left channel is missing.

Changed in jokosher:
importance: Undecided → Medium
status: Unconfirmed → Confirmed
Revision history for this message
Luke Tilley (sinisterguy) wrote :

the problem is in Event.py line 475:

if st.get_name() == "level":
 end = st["endtime"] / float(gst.SECOND)
 self.levels.append(DbToFloat(st["peak"][0]))
 self.loadingLength = int(end)

st["peak"] contains 2 values, one for each channel of the audio. We're currently only taking the measurement of the left channel. The only question is how do you properly represent a stereo file in one waveform? I was thinking of just doing the average of the two (which works to fix the problem btw) but i'm not sure if this is the proper method.

Changed in jokosher:
assignee: nobody → sinisterguy
status: Confirmed → In Progress
Revision history for this message
Laszlo Pandy (laszlok) wrote :

It turns out that where there is no audio, the level element gives us negative infinity, and anything added to negative infinity is still negative infinity. Now we check this before adding the values.

Changed in jokosher:
assignee: sinisterguy → nobody
status: In Progress → Fix Committed
Laszlo Pandy (laszlok)
Changed in jokosher:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.