ayyi / libwaveform

Libwaveform aims to provide efficient, versatile and easy-to-use interactive display of audio waveforms for Gtk+-2 and X11 applications.
20 stars 4 forks source link

Ardour Peak files are not parsed correctly #6

Open x42 opened 3 years ago

x42 commented 3 years ago

https://github.com/ayyi/libwaveform/blob/31a9fce7e922b45616cc1adfadef39529e5eabeb/wf/loaders/ardour.c#L58-L60

The code comment should read " ardour peak files *minumum first."

The peak-file stores min/max value for a given number or samples. Both values can be negative or positive. e.g a DC offset of 0.5 will have min = 0.5 , max = 0.5. -- The code above however would incorrectly represent it as range -0.5 .. +0.5

It is not uncommon that the signal does not cross zero for a few blocks of samples.

ayyi commented 3 years ago

Hi Robin

Thanks for the information. It makes sense to me now.

I will make a correction.

Regards