View Full Version : Waveform code for bug 48

08-01-2012, 08:53 PM
Starting a thread here to discuss adding the waveform plot to the sequence editor. My hope was that I could obtain some of the 2.x code that was used to read the data from the audio track to determine the plot points. Hopefully the existing code can provide a starting point or refactored to work in the new code. I believe that the Audio class could be a starting place for the audio parsing as the other audio handling is already there. Then the plot points could be interpreted into a control based on the timeline classes. Just some early thoughts, but really wanted to get the audio file parsing figured out first.

Open for additional thoughts/discussion.


08-01-2012, 09:24 PM
I've emailed KC about it; I know he's normally too busy during the week to check the forums, so hopefully I can get a reply sometime to know if there's any useful info from 2.x.

I do vaguely (*very* vaguely) remember him saying that it was a bit of a hack in 2.x, I think just reading raw values from the FMOD stream and manually drawing them, which was why we were thinking of redoing it again using the Naudio stuff in 3.x. (Plus, it would work differently as it's in the custom control for the editor, anyway.)

We haven't looked closely at NAudio yet, so not sure how suitable it would be.

08-02-2012, 08:56 AM
Yeap, the word is: start fresh. The old was dodgy enough and cobbled together than it will just be a case of pulling the data from the FMOD ...... <something>...... and using that.

08-02-2012, 10:31 AM
NAudio looks interesting at the surface. I would say that if they provide similar capabilities, that a decision on one or the other could be made and then it should be used for all audio functionality rather than mix and match. FMOD is unmanaged code with a .NET wrapper around it whereas NAudio appears to be managed code. I'll do some more comparison reading as I get time and form an opinion on or the other.